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
367468f1
Commit
367468f1
authored
Nov 09, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check extradata_size before accessing extradata.
Fixes ticket #627.
parent
11e155c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
flicvideo.c
libavcodec/flicvideo.c
+6
-3
No files found.
libavcodec/flicvideo.c
View file @
367468f1
...
...
@@ -81,6 +81,12 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
unsigned
char
*
fli_header
=
(
unsigned
char
*
)
avctx
->
extradata
;
int
depth
;
if
(
avctx
->
extradata_size
!=
12
&&
avctx
->
extradata_size
!=
128
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Expected extradata of 12 or 128 bytes
\n
"
);
return
AVERROR_INVALIDDATA
;
}
s
->
avctx
=
avctx
;
s
->
fli_type
=
AV_RL16
(
&
fli_header
[
4
]);
/* Might be overridden if a Magic Carpet FLC */
...
...
@@ -90,9 +96,6 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
/* special case for magic carpet FLIs */
s
->
fli_type
=
FLC_MAGIC_CARPET_SYNTHETIC_TYPE_CODE
;
depth
=
8
;
}
else
if
(
s
->
avctx
->
extradata_size
!=
128
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Expected extradata of 12 or 128 bytes
\n
"
);
return
-
1
;
}
else
{
depth
=
AV_RL16
(
&
fli_header
[
12
]);
}
...
...
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