[FFmpeg-cvslog] avcodec/vp9dsp: fix overwrite by 1 in vert_left pred.
Ronald S. Bultje
git at videolan.org
Sun Oct 20 21:17:00 CEST 2013
ffmpeg | branch: master | Ronald S. Bultje <rbultje at gmail.com> | Sun Oct 20 21:05:28 2013 +0200| [fed483f188b3cd50d25068d74bda00b4f12f5fc8] | committer: Clément Bœsch
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 at pkh.me>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fed483f188b3cd50d25068d74bda00b4f12f5fc8
---
libavcodec/vp9dsp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vp9dsp.c b/libavcodec/vp9dsp.c
index d35d753..6159616 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); \
} \
}
More information about the ffmpeg-cvslog
mailing list