1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

Merge commit '6255ccf7d51c82ab79bf0cd47a921f572dda4489'

* commit '6255ccf7d51c82ab79bf0cd47a921f572dda4489':
  indeo4: Check the quantization matrix index

Conflicts:
	libavcodec/indeo4.c

See: 8a20774a24

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-07-14 12:42:23 +02:00

View File

@@ -371,8 +371,9 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,
av_log(avctx, AV_LOG_ERROR, "Custom quant matrix encountered!\n"); av_log(avctx, AV_LOG_ERROR, "Custom quant matrix encountered!\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if (quant_mat > 21) { if (quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) {
av_log(avctx, AV_LOG_ERROR, "Invalid quant matrix encountered!\n"); avpriv_request_sample(avctx, "Quantization matrix %d",
quant_mat);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
band->quant_mat = quant_mat; band->quant_mat = quant_mat;