mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
Merge commit 'a465ed5707f5cbc9713d5e9629d424cd2d46e038' into release/0.10
* commit 'a465ed5707f5cbc9713d5e9629d424cd2d46e038': pgssubdec: Check RLE size before copying Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -207,6 +207,13 @@ static int parse_picture_segment(AVCodecContext *avctx,
|
||||
/* Decode rle bitmap length, stored size includes width/height data */
|
||||
rle_bitmap_len = bytestream_get_be24(&buf) - 2*2;
|
||||
|
||||
if (buf_size > rle_bitmap_len) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Buffer dimension %d larger than the expected RLE data %d\n",
|
||||
buf_size, rle_bitmap_len);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* Get bitmap dimensions from data */
|
||||
width = bytestream_get_be16(&buf);
|
||||
height = bytestream_get_be16(&buf);
|
||||
|
||||
Reference in New Issue
Block a user