aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rdt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-24 13:20:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-24 13:21:33 +0200
commit726316240bcc41cef6053dd6d1e46a3c57328498 (patch)
tree9f9c180540b718792d73c1f52633a4d392aa26a8 /libavformat/rdt.c
parentcba92a2226151abf0e3c24ed594e127203d485b8 (diff)
parent8692e6284f5169257a537c8fc25addf32fc67c87 (diff)
downloadffmpeg-726316240bcc41cef6053dd6d1e46a3c57328498.tar.gz
Merge commit '8692e6284f5169257a537c8fc25addf32fc67c87'
* commit '8692e6284f5169257a537c8fc25addf32fc67c87': rdt: check malloc calls Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rdt.c')
-rw-r--r--libavformat/rdt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index 201a3e0464..37fcd7603c 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -399,6 +399,8 @@ rdt_parse_b64buf (unsigned int *target_len, const char *p)
}
*target_len = len * 3 / 4;
target = av_mallocz(*target_len + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!target)
+ return NULL;
av_base64_decode(target, p, *target_len);
return target;
}
@@ -521,8 +523,10 @@ static PayloadContext *
rdt_new_context (void)
{
PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
-
- int ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
+ int ret;
+ if (!rdt)
+ return NULL;
+ ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
if (ret < 0) {
av_free(rdt);
return NULL;