git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1493d2
)
swfdec: check space before copy
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 12 Nov 2012 18:29:08 +0000
(19:29 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 12 Nov 2012 18:29:27 +0000
(19:29 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/swfdec.c
patch
|
blob
|
history
diff --git
a/libavformat/swfdec.c
b/libavformat/swfdec.c
index
b8c2e93
..
193df25
100644
(file)
--- 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;