1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-14 00:58:38 +02:00

quickdraw: Skip the empty 512 byte header for images

Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
This commit is contained in:
Vittorio Giovara 2015-05-11 20:11:04 +01:00
parent d0dce15da3
commit 0348e74c01

View File

@ -125,6 +125,10 @@ static int decode_frame(AVCodecContext *avctx,
bytestream2_init(&gbc, avpkt->data, avpkt->size);
/* PICT images start with a 512 bytes empty header */
if (bytestream2_peek_be32(&gbc) == 0)
bytestream2_skip(&gbc, 512);
/* smallest PICT header */
if (bytestream2_get_bytes_left(&gbc) < 40) {
av_log(avctx, AV_LOG_ERROR, "Frame is too small %d\n",