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
d39d7122
Commit
d39d7122
authored
Sep 30, 2011
by
Laurent Aimar
Committed by
Michael Niedermayer
Oct 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix double free on error in Deluxe Paint Animation demuxer.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7afe9e56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
anm.c
libavformat/anm.c
+8
-15
No files found.
libavformat/anm.c
View file @
d39d7122
...
...
@@ -134,18 +134,17 @@ static int read_header(AVFormatContext *s,
/* color cycling and palette data */
st
->
codec
->
extradata_size
=
16
*
8
+
4
*
256
;
st
->
codec
->
extradata
=
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
close_and_return
;
}
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
ret
=
avio_read
(
pb
,
st
->
codec
->
extradata
,
st
->
codec
->
extradata_size
);
if
(
ret
<
0
)
goto
close_and_return
;
return
ret
;
/* read page table */
ret
=
avio_seek
(
pb
,
anm
->
page_table_offset
,
SEEK_SET
);
if
(
ret
<
0
)
goto
close_and_return
;
return
ret
;
for
(
i
=
0
;
i
<
MAX_PAGES
;
i
++
)
{
Page
*
p
=
&
anm
->
pt
[
i
];
...
...
@@ -156,21 +155,15 @@ static int read_header(AVFormatContext *s,
/* find page of first frame */
anm
->
page
=
find_record
(
anm
,
0
);
if
(
anm
->
page
<
0
)
{
ret
=
anm
->
page
;
goto
close_and_return
;
}
if
(
anm
->
page
<
0
)
return
anm
->
page
;
anm
->
record
=
-
1
;
return
0
;
invalid:
av_log_ask_for_sample
(
s
,
NULL
);
ret
=
AVERROR_INVALIDDATA
;
close_and_return:
av_close_input_stream
(
s
);
return
ret
;
return
AVERROR_INVALIDDATA
;
}
static
int
read_packet
(
AVFormatContext
*
s
,
...
...
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