diff options
Diffstat (limited to 'libavformat/swfdec.c')
-rw-r--r-- | libavformat/swfdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index b8c2e930c3..193df25e2f 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -362,6 +362,11 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) default: av_assert0(0); } + + if (linesize * height > pkt->size) { + res = AVERROR_INVALIDDATA; + goto bitmap_end; + } memcpy(pkt->data, buf + colormapsize*colormapbpp, linesize * height); res = pkt->size; |