Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7bf96472
Commit
7bf96472
authored
Aug 13, 2015
by
Federico Tomassetti
Committed by
Luca Barbato
Aug 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp7: bound checking in vp7_decode_frame_header
CC: libav-stable@libav.org
parent
f34b152e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
vp8.c
libavcodec/vp8.c
+8
-0
No files found.
libavcodec/vp8.c
View file @
7bf96472
...
...
@@ -480,6 +480,10 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
int
width
=
s
->
avctx
->
width
;
int
height
=
s
->
avctx
->
height
;
if
(
buf_size
<
4
)
{
return
AVERROR_INVALIDDATA
;
}
s
->
profile
=
(
buf
[
0
]
>>
1
)
&
7
;
if
(
s
->
profile
>
1
)
{
avpriv_request_sample
(
s
->
avctx
,
"Unknown profile %d"
,
s
->
profile
);
...
...
@@ -493,6 +497,10 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
buf
+=
4
-
s
->
profile
;
buf_size
-=
4
-
s
->
profile
;
if
(
buf_size
<
part1_size
)
{
return
AVERROR_INVALIDDATA
;
}
memcpy
(
s
->
put_pixels_tab
,
s
->
vp8dsp
.
put_vp8_epel_pixels_tab
,
sizeof
(
s
->
put_pixels_tab
));
ff_vp56_init_range_decoder
(
c
,
buf
,
part1_size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment