projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80d5168
)
xldec: Check that width is a multiple of 4
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 21 Apr 2012 19:29:48 +0000
(21:29 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 21 Apr 2012 19:30:23 +0000
(21:30 +0200)
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/xl.c
patch
|
blob
|
history
diff --git
a/libavcodec/xl.c
b/libavcodec/xl.c
index
6cdb91b
..
c8b0e06
100644
(file)
--- a/
libavcodec/xl.c
+++ b/
libavcodec/xl.c
@@
-52,6
+52,11
@@
static int decode_frame(AVCodecContext *avctx,
uint32_t val;
int y0, y1, y2, y3 = 0, c0 = 0, c1 = 0;
+ if (avctx->width & 3) {
+ av_log(avctx, AV_LOG_ERROR, "width is not a multiple of 4\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if(p->data[0])
avctx->release_buffer(avctx, p);