Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
e211e255
Commit
e211e255
authored
14 years ago
by
Peter Ross
Committed by
Ronald S. Bultje
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
bink: prevent overflows within binkidct by using int-sized intermediate array
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
588a3ffd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/binkidct.c
+3
-3
3 additions, 3 deletions
libavcodec/binkidct.c
tests/ref/fate/bink-demux-video
+4
-4
4 additions, 4 deletions
tests/ref/fate/bink-demux-video
with
7 additions
and
7 deletions
libavcodec/binkidct.c
+
3
−
3
View file @
e211e255
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
#define MUNGE_ROW(x) (((x) + 0x7F)>>8)
#define MUNGE_ROW(x) (((x) + 0x7F)>>8)
#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src)
#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src)
static
inline
void
bink_idct_col
(
DCTELEM
*
dest
,
const
DCTELEM
*
src
)
static
inline
void
bink_idct_col
(
int
*
dest
,
const
DCTELEM
*
src
)
{
{
if
((
src
[
8
]
|
src
[
16
]
|
src
[
24
]
|
src
[
32
]
|
src
[
40
]
|
src
[
48
]
|
src
[
56
])
==
0
)
{
if
((
src
[
8
]
|
src
[
16
]
|
src
[
24
]
|
src
[
32
]
|
src
[
40
]
|
src
[
48
]
|
src
[
56
])
==
0
)
{
dest
[
0
]
=
dest
[
0
]
=
...
@@ -81,7 +81,7 @@ static inline void bink_idct_col(DCTELEM *dest, const DCTELEM *src)
...
@@ -81,7 +81,7 @@ static inline void bink_idct_col(DCTELEM *dest, const DCTELEM *src)
void
ff_bink_idct_c
(
DCTELEM
*
block
)
void
ff_bink_idct_c
(
DCTELEM
*
block
)
{
{
int
i
;
int
i
;
DCTELEM
temp
[
64
];
int
temp
[
64
];
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
bink_idct_col
(
&
temp
[
i
],
&
block
[
i
]);
bink_idct_col
(
&
temp
[
i
],
&
block
[
i
]);
...
@@ -103,7 +103,7 @@ void ff_bink_idct_add_c(uint8_t *dest, int linesize, DCTELEM *block)
...
@@ -103,7 +103,7 @@ void ff_bink_idct_add_c(uint8_t *dest, int linesize, DCTELEM *block)
void
ff_bink_idct_put_c
(
uint8_t
*
dest
,
int
linesize
,
DCTELEM
*
block
)
void
ff_bink_idct_put_c
(
uint8_t
*
dest
,
int
linesize
,
DCTELEM
*
block
)
{
{
int
i
;
int
i
;
DCTELEM
temp
[
64
];
int
temp
[
64
];
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
bink_idct_col
(
&
temp
[
i
],
&
block
[
i
]);
bink_idct_col
(
&
temp
[
i
],
&
block
[
i
]);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
tests/ref/fate/bink-demux-video
+
4
−
4
View file @
e211e255
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
0, 72000, 460800, 0x71c0f48e
0, 72000, 460800, 0x71c0f48e
0, 78000, 460800, 0x5fc8f783
0, 78000, 460800, 0x5fc8f783
0, 84000, 460800, 0xd23d336a
0, 84000, 460800, 0xd23d336a
0, 90000, 460800, 0xa
7ac
a9e0
0, 90000, 460800, 0xa
dcf
a9e0
0, 96000, 460800, 0x
1dff
2144
0, 96000, 460800, 0x
2422
2144
0, 102000, 460800, 0x8
2cf
8b2b
0, 102000, 460800, 0x8
8f2
8b2b
0, 108000, 460800, 0x
4cbe
3544
0, 108000, 460800, 0x
52e1
3544
0, 114000, 460800, 0x7e724731
0, 114000, 460800, 0x7e724731
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment