diff options
-rw-r--r-- | libavcodec/prosumer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index 2420dd5f12..6e98677b55 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -57,6 +57,8 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui b = lut[2 * idx]; while (1) { + if (bytestream2_get_bytes_left_p(pb) <= 0) + return 0; if (((b & 0xFF00u) != 0x8000u) || (b & 0xFFu)) { if ((b & 0xFF00u) != 0x8000u) { bytestream2_put_le16(pb, b); |