projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c66862
)
xl: Fix overreads
author
Aneesh Dogra
<lionaneesh@gmail.com>
Mon, 19 Dec 2011 18:30:30 +0000
(
00:00
+0530)
committer
Martin Storsjö
<martin@martin.st>
Mon, 19 Dec 2011 18:36:26 +0000
(20:36 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/xl.c
patch
|
blob
|
history
diff --git
a/libavcodec/xl.c
b/libavcodec/xl.c
index
197b0c2
..
0ebc946
100644
(file)
--- a/
libavcodec/xl.c
+++ b/
libavcodec/xl.c
@@
-68,6
+68,12
@@
static int decode_frame(AVCodecContext *avctx,
V = a->pic.data[2];
stride = avctx->width - 4;
+
+ if (buf_size < avctx->width * avctx->height) {
+ av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
+ return AVERROR_INVALIDDATA;
+ }
+
for (i = 0; i < avctx->height; i++) {
/* lines are stored in reversed order */
buf += stride;