Commit fed483f1 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by 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: 's avatarClément Bœsch <u@pkh.me>
parent b2d9790c
......@@ -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); \
} \
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment