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
00e1bf8a
Commit
00e1bf8a
authored
Sep 10, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/flic: check for memory allocation failures
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
803445e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
flic.c
libavformat/flic.c
+6
-2
No files found.
libavformat/flic.c
View file @
00e1bf8a
...
...
@@ -125,8 +125,10 @@ static int flic_read_header(AVFormatContext *s)
}
/* send over the whole 128-byte FLIC header */
st
->
codec
->
extradata_size
=
FLIC_HEADER_SIZE
;
st
->
codec
->
extradata
=
av_malloc
(
FLIC_HEADER_SIZE
);
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata_size
=
FLIC_HEADER_SIZE
;
memcpy
(
st
->
codec
->
extradata
,
header
,
FLIC_HEADER_SIZE
);
/* peek at the preamble to detect TFTD videos - they seem to always start with an audio chunk */
...
...
@@ -176,8 +178,10 @@ static int flic_read_header(AVFormatContext *s)
/* send over abbreviated FLIC header chunk */
av_free
(
st
->
codec
->
extradata
);
st
->
codec
->
extradata_size
=
12
;
st
->
codec
->
extradata
=
av_malloc
(
12
);
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata_size
=
12
;
memcpy
(
st
->
codec
->
extradata
,
header
,
12
);
}
else
if
(
magic_number
==
FLIC_FILE_MAGIC_1
)
{
...
...
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