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>
pull/19/head
Michael Niedermayer 12 years ago
parent 058e1f8dd7
commit 7bab631f7d
  1. 3
      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);

Loading…
Cancel
Save