Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-06 04:37:49 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-03-06 04:38:26 +0400
commit7bab631f7df55b361368296f125b95a1814bc18c (patch)
treefc6ec4427935c04b24e62d83e9979fe7a50526d8 /libavcodec/mss2dsp.c
parent058e1f8dd71b30e3181a36cc66c5a278ebf835ba (diff)
mss2dsp/upsample_plane: fix 0x0 handling
Fixes invalid memcpy and out of array accesses Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mss2dsp.c')
-rw-r--r--libavcodec/mss2dsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mss2dsp.c b/libavcodec/mss2dsp.c
index b18bf1f0a9..c5fc1f8dcf 100644
--- 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);