X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibtheoraenc.c;h=e6b1cbd2ed1fdc7ddf3ee241e7964d848b6836d1;hb=a9f1d584e53fb39d983201585cb136986a85cac8;hp=9366a95e309b3590326b7f564da77c1eb9e16eef;hpb=07a79cf8694ac685ae8f579ccc33d113eb46fe3d;p=ffmpeg diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 9366a95e309..e6b1cbd2ed1 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -111,6 +111,8 @@ static int get_stats(AVCodecContext *avctx, int eos) // libtheora generates a summary header at the end memcpy(h->stats, buf, bytes); avctx->stats_out = av_malloc(b64_size); + if (!avctx->stats_out) + return AVERROR(ENOMEM); av_base64_encode(avctx->stats_out, b64_size, h->stats, h->stats_offset); } return 0;