mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/rmdec: rm_read_extradata: add error message for oversized extradata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ef2f9073dd
commit
50f9de59a0
|
@ -86,8 +86,10 @@ static void get_str8(AVIOContext *pb, char *buf, int buf_size)
|
||||||
|
|
||||||
static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned size)
|
static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned size)
|
||||||
{
|
{
|
||||||
if (size >= 1<<24)
|
if (size >= 1<<24) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "extradata size %u too large\n", size);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
if (ff_get_extradata(avctx, pb, size) < 0)
|
if (ff_get_extradata(avctx, pb, size) < 0)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue