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:
7acee66
)
8bps: check index against buffer size before reading line length pointer.
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 14 Nov 2012 02:33:06 +0000
(
03:33
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 14 Nov 2012 02:34:01 +0000
(
03:34
+0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/8bps.c
patch
|
blob
|
history
diff --git
a/libavcodec/8bps.c
b/libavcodec/8bps.c
index
a6d0a1b
..
f895ed3
100644
(file)
--- a/
libavcodec/8bps.c
+++ b/
libavcodec/8bps.c
@@
-98,6
+98,8
@@
static int decode_frame(AVCodecContext *avctx, void *data,
for (row = 0; row < height; row++) {
pixptr = c->pic.data[0] + row * c->pic.linesize[0] + planemap[p];
pixptr_end = pixptr + c->pic.linesize[0];
+ if(lp - encoded + row*2 + 1 >= buf_size)
+ return -1;
dlen = av_be2ne16(*(const unsigned short *)(lp + row * 2));
/* Decode a row of this plane */
while (dlen > 0) {