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
58236862
Commit
58236862
authored
Dec 13, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12: do not decode extradata more than once.
Fixes CVE-2012-2803. CC: libav-stable@libav.org
parent
c661cb66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
mpeg12.c
libavcodec/mpeg12.c
+2
-1
mpeg12.h
libavcodec/mpeg12.h
+1
-0
No files found.
libavcodec/mpeg12.c
View file @
58236862
...
...
@@ -2456,8 +2456,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
s
->
slice_count
=
0
;
if
(
avctx
->
extradata
&&
!
avctx
->
frame_number
)
{
if
(
avctx
->
extradata
&&
!
s
->
extradata_decoded
)
{
int
ret
=
decode_chunks
(
avctx
,
picture
,
got_output
,
avctx
->
extradata
,
avctx
->
extradata_size
);
s
->
extradata_decoded
=
1
;
if
(
ret
<
0
&&
(
avctx
->
err_recognition
&
AV_EF_EXPLODE
))
return
ret
;
}
...
...
libavcodec/mpeg12.h
View file @
58236862
...
...
@@ -42,6 +42,7 @@ typedef struct Mpeg1Context {
AVRational
frame_rate_ext
;
///< MPEG-2 specific framerate modificator
int
sync
;
///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
int
closed_gop
;
///< GOP is closed
int
extradata_decoded
;
}
Mpeg1Context
;
extern
uint8_t
ff_mpeg12_static_rl_table_store
[
2
][
2
][
2
*
MAX_RUN
+
MAX_LEVEL
+
3
];
...
...
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