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
c571424c
Commit
c571424c
authored
Jul 13, 2015
by
Alexandra Hájková
Committed by
Anton Khirnov
Jul 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfdec: prevent memory leaks found with Coverity Scan
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
1b9a8e5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
asfdec.c
libavformat/asfdec.c
+8
-4
No files found.
libavformat/asfdec.c
View file @
c571424c
...
...
@@ -281,8 +281,10 @@ static int asf_read_value(AVFormatContext *s, uint8_t *name, uint16_t name_len,
av_log
(
s
,
AV_LOG_WARNING
,
"av_dict_set failed.
\n
"
);
}
else
{
char
buf
[
256
];
if
(
val_len
>
sizeof
(
buf
))
return
AVERROR_INVALIDDATA
;
if
(
val_len
>
sizeof
(
buf
))
{
ret
=
AVERROR_INVALIDDATA
;
goto
failed
;
}
if
((
ret
=
avio_read
(
pb
,
value
,
val_len
))
<
0
)
goto
failed
;
if
(
ret
<
2
*
val_len
)
...
...
@@ -404,8 +406,10 @@ static int asf_read_picture(AVFormatContext *s, int len)
}
asf
->
asf_st
[
asf
->
nb_streams
]
=
av_mallocz
(
sizeof
(
*
asf_st
));
asf_st
=
asf
->
asf_st
[
asf
->
nb_streams
];
if
(
!
asf_st
)
return
AVERROR
(
ENOMEM
);
if
(
!
asf_st
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
st
->
disposition
|=
AV_DISPOSITION_ATTACHED_PIC
;
st
->
codec
->
codec_type
=
asf_st
->
type
=
AVMEDIA_TYPE_VIDEO
;
...
...
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