1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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>
This commit is contained in:
Ronald S. Bultje 2013-10-20 21:05:28 +02:00 committed by Clément Bœsch
parent b2d9790c2b
commit fed483f188

View File

@ -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); \
} \
}