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
8692e628
Commit
8692e628
authored
May 23, 2014
by
Nidhi Makhijani
Committed by
Anton Khirnov
May 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rdt: check malloc calls
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
21f68c24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
rdt.c
libavformat/rdt.c
+6
-2
No files found.
libavformat/rdt.c
View file @
8692e628
...
@@ -399,6 +399,8 @@ rdt_parse_b64buf (unsigned int *target_len, const char *p)
...
@@ -399,6 +399,8 @@ rdt_parse_b64buf (unsigned int *target_len, const char *p)
}
}
*
target_len
=
len
*
3
/
4
;
*
target_len
=
len
*
3
/
4
;
target
=
av_mallocz
(
*
target_len
+
FF_INPUT_BUFFER_PADDING_SIZE
);
target
=
av_mallocz
(
*
target_len
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
target
)
return
NULL
;
av_base64_decode
(
target
,
p
,
*
target_len
);
av_base64_decode
(
target
,
p
,
*
target_len
);
return
target
;
return
target
;
}
}
...
@@ -521,8 +523,10 @@ static PayloadContext *
...
@@ -521,8 +523,10 @@ static PayloadContext *
rdt_new_context
(
void
)
rdt_new_context
(
void
)
{
{
PayloadContext
*
rdt
=
av_mallocz
(
sizeof
(
PayloadContext
));
PayloadContext
*
rdt
=
av_mallocz
(
sizeof
(
PayloadContext
));
int
ret
;
int
ret
=
avformat_open_input
(
&
rdt
->
rmctx
,
""
,
&
ff_rdt_demuxer
,
NULL
);
if
(
!
rdt
)
return
NULL
;
ret
=
avformat_open_input
(
&
rdt
->
rmctx
,
""
,
&
ff_rdt_demuxer
,
NULL
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_free
(
rdt
);
av_free
(
rdt
);
return
NULL
;
return
NULL
;
...
...
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