diff options
author | Ronald S. Bultje <rbultje@gmail.com> | 2013-10-20 21:05:28 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2013-10-20 21:16:53 +0200 |
commit | fed483f188b3cd50d25068d74bda00b4f12f5fc8 (patch) | |
tree | a36d561596547a1c796fb8fe5b4f7a263f8cb10a /libavcodec | |
parent | b2d9790c2ba75b5e5ac5194042f4175cb66cc0e0 (diff) | |
download | ffmpeg-fed483f188b3cd50d25068d74bda00b4f12f5fc8.tar.gz |
avcodec/vp9dsp: fix overwrite by 1 in vert_left pred.
The memset following the memcpy was silencing the problem since
re-writing that same byte.
Fixes CID1108597, CID1108598, (16x16)
CID1108599, CID1108600, (8x8)
CID1108601, CID1108602 (32x32)
Signed-off-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vp9dsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp9dsp.c b/libavcodec/vp9dsp.c index d35d753e00..6159616fda 100644 --- a/libavcodec/vp9dsp.c +++ b/libavcodec/vp9dsp.c @@ -772,9 +772,9 @@ static void vert_left_##size##x##size##_c(uint8_t *dst, ptrdiff_t stride, \ vo[size - 2] = (top[size - 2] + top[size - 1] * 3 + 2) >> 2; \ \ for (j = 0; j < size / 2; j++) { \ - memcpy(dst + j*2 * stride, ve + j, size - j); \ + memcpy(dst + j*2 * stride, ve + j, size - j - 1); \ memset(dst + j*2 * stride + size - j - 1, top[size - 1], j + 1); \ - memcpy(dst + (j*2 + 1) * stride, vo + j, size - j); \ + memcpy(dst + (j*2 + 1) * stride, vo + j, size - j - 1); \ memset(dst + (j*2 + 1) * stride + size - j - 1, top[size - 1], j + 1); \ } \ } |