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
d206fd99
Commit
d206fd99
authored
Oct 22, 2013
by
Derek Buitenhuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: Check for memory allocation failure of private data
Signed-off-by:
Derek Buitenhuis
<
derek.buitenhuis@gmail.com
>
parent
52aed193
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
avio.c
libavformat/avio.c
+7
-0
No files found.
libavformat/avio.c
View file @
d206fd99
...
...
@@ -143,6 +143,10 @@ static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up,
uc
->
max_packet_size
=
0
;
/* default: stream file */
if
(
up
->
priv_data_size
)
{
uc
->
priv_data
=
av_mallocz
(
up
->
priv_data_size
);
if
(
!
uc
->
priv_data
)
{
err
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
if
(
up
->
priv_data_class
)
{
int
proto_len
=
strlen
(
up
->
name
);
char
*
start
=
strchr
(
uc
->
filename
,
','
);
...
...
@@ -180,6 +184,9 @@ static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up,
return
0
;
fail:
*
puc
=
NULL
;
if
(
uc
)
av_freep
(
&
uc
->
priv_data
);
av_freep
(
&
uc
);
#if CONFIG_NETWORK
if
(
up
->
flags
&
URL_PROTOCOL_FLAG_NETWORK
)
ff_network_close
();
...
...
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