Commit 3c5c6b9d authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  ivi_common: check that scan pattern is set before using it.
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents be26232e deabb52a
...@@ -467,6 +467,11 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile ...@@ -467,6 +467,11 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile
} }
if (cbp & 1) { /* block coded ? */ if (cbp & 1) { /* block coded ? */
if (!band->scan) {
av_log(avctx, AV_LOG_ERROR, "Scan pattern is not set.\n");
return AVERROR_INVALIDDATA;
}
scan_pos = -1; scan_pos = -1;
memset(trvec, 0, num_coeffs*sizeof(trvec[0])); /* zero transform vector */ memset(trvec, 0, num_coeffs*sizeof(trvec[0])); /* zero transform vector */
memset(col_flags, 0, sizeof(col_flags)); /* zero column flags */ memset(col_flags, 0, sizeof(col_flags)); /* zero column flags */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment