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
849d4b04
Commit
849d4b04
authored
May 28, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iff_ilbm: fix null ptr deref
Fixes Ticket1362 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
77a4c8b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
iff.c
libavcodec/iff.c
+7
-3
No files found.
libavcodec/iff.c
View file @
849d4b04
...
...
@@ -191,7 +191,13 @@ static int extract_header(AVCodecContext *const avctx,
const
uint8_t
*
buf
;
unsigned
buf_size
;
IffContext
*
s
=
avctx
->
priv_data
;
int
palette_size
=
avctx
->
extradata_size
-
AV_RB16
(
avctx
->
extradata
);
int
palette_size
;
if
(
avctx
->
extradata_size
<
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"not enough extradata
\n
"
);
return
AVERROR_INVALIDDATA
;
}
palette_size
=
avctx
->
extradata_size
-
AV_RB16
(
avctx
->
extradata
);
if
(
avpkt
)
{
int
image_size
;
...
...
@@ -207,8 +213,6 @@ static int extract_header(AVCodecContext *const avctx,
return
AVERROR_INVALIDDATA
;
}
}
else
{
if
(
avctx
->
extradata_size
<
2
)
return
AVERROR_INVALIDDATA
;
buf
=
avctx
->
extradata
;
buf_size
=
bytestream_get_be16
(
&
buf
);
if
(
buf_size
<=
1
||
palette_size
<
0
)
{
...
...
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