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
58236862
Commit
58236862
authored
12 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
mpeg12: do not decode extradata more than once.
Fixes CVE-2012-2803. CC: libav-stable@libav.org
parent
c661cb66
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/mpeg12.c
+2
-1
2 additions, 1 deletion
libavcodec/mpeg12.c
libavcodec/mpeg12.h
+1
-0
1 addition, 0 deletions
libavcodec/mpeg12.h
with
3 additions
and
1 deletion
libavcodec/mpeg12.c
+
2
−
1
View file @
58236862
...
@@ -2456,8 +2456,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
...
@@ -2456,8 +2456,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
s
->
slice_count
=
0
;
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
);
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
))
if
(
ret
<
0
&&
(
avctx
->
err_recognition
&
AV_EF_EXPLODE
))
return
ret
;
return
ret
;
}
}
...
...
This diff is collapsed.
Click to expand it.
libavcodec/mpeg12.h
+
1
−
0
View file @
58236862
...
@@ -42,6 +42,7 @@ typedef struct Mpeg1Context {
...
@@ -42,6 +42,7 @@ typedef struct Mpeg1Context {
AVRational
frame_rate_ext
;
///< MPEG-2 specific framerate modificator
AVRational
frame_rate_ext
;
///< MPEG-2 specific framerate modificator
int
sync
;
///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
int
sync
;
///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
int
closed_gop
;
///< GOP is closed
int
closed_gop
;
///< GOP is closed
int
extradata_decoded
;
}
Mpeg1Context
;
}
Mpeg1Context
;
extern
uint8_t
ff_mpeg12_static_rl_table_store
[
2
][
2
][
2
*
MAX_RUN
+
MAX_LEVEL
+
3
];
extern
uint8_t
ff_mpeg12_static_rl_table_store
[
2
][
2
][
2
*
MAX_RUN
+
MAX_LEVEL
+
3
];
...
...
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