Merge commit '8692e6284f5169257a537c8fc25addf32fc67c87'
* commit '8692e6284f5169257a537c8fc25addf32fc67c87': rdt: check malloc calls Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
726316240b
@ -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 *
|
|||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user