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:
058e1f8
)
mss2dsp/upsample_plane: fix 0x0 handling
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 6 Mar 2013 00:37:49 +0000
(
01:37
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 6 Mar 2013 00:38:26 +0000
(
01:38
+0100)
Fixes invalid memcpy and out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mss2dsp.c
patch
|
blob
|
history
diff --git
a/libavcodec/mss2dsp.c
b/libavcodec/mss2dsp.c
index
b18bf1f
..
c5fc1f8
100644
(file)
--- a/
libavcodec/mss2dsp.c
+++ b/
libavcodec/mss2dsp.c
@@
-106,6
+106,9
@@
static void upsample_plane_c(uint8_t *plane, int plane_stride, int w, int h)
uint8_t *src1, *src2, *dst1, *dst2, *p, a, b;
int i, j;
+ if(!w || !h)
+ return;
+
w += (w & 1);
h += (h & 1);