avcodec/jpeg2000dec: Also include remaining length in "Block length" error message

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-15 00:32:01 +02:00
parent dd9400930a
commit 5ef578d03a

View File

@ -915,8 +915,8 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
|| sizeof(cblk->data) < cblk->length + cblk->lengthinc[cwsno] + 4
) {
av_log(s->avctx, AV_LOG_ERROR,
"Block length %"PRIu16" or lengthinc %d is too large\n",
cblk->length, cblk->lengthinc[cwsno]);
"Block length %"PRIu16" or lengthinc %d is too large, left %d\n",
cblk->length, cblk->lengthinc[cwsno], bytestream2_get_bytes_left(&s->g));
return AVERROR_INVALIDDATA;
}