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
ee715f49
Commit
ee715f49
authored
Sep 28, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dfa: check that the caller set width/height properly.
Fixes CVE-2012-2786.
parent
89191843
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
dfa.c
libavcodec/dfa.c
+6
-0
No files found.
libavcodec/dfa.c
View file @
ee715f49
...
...
@@ -22,6 +22,8 @@
#include "avcodec.h"
#include "bytestream.h"
#include "libavutil/imgutils.h"
#include "libavutil/lzo.h" // for av_memcpy_backptr
typedef
struct
DfaContext
{
...
...
@@ -34,9 +36,13 @@ typedef struct DfaContext {
static
av_cold
int
dfa_decode_init
(
AVCodecContext
*
avctx
)
{
DfaContext
*
s
=
avctx
->
priv_data
;
int
ret
;
avctx
->
pix_fmt
=
PIX_FMT_PAL8
;
if
((
ret
=
av_image_check_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
))
<
0
)
return
ret
;
s
->
frame_buf
=
av_mallocz
(
avctx
->
width
*
avctx
->
height
+
AV_LZO_OUTPUT_PADDING
);
if
(
!
s
->
frame_buf
)
return
AVERROR
(
ENOMEM
);
...
...
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