diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index e4dd1b05b5..ffebbd8fd6 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -147,6 +147,9 @@ static int decode_frame(AVCodecContext *avctx, return AVERROR_PATCHWELCOME; } + if (bits_per_color > 32) + return AVERROR_INVALIDDATA; + buf += 820; avctx->sample_aspect_ratio.num = read32(&buf, endian); avctx->sample_aspect_ratio.den = read32(&buf, endian);