summaryrefslogtreecommitdiff
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-10-26 21:43:55 +0100
committerMans Rullgard <mans@mansr.com>2012-10-27 17:02:46 +0100
commit4471a2420717d8dc10b573cca50292d0d598d925 (patch)
tree585615433848b8c92953b1a917ab6714facca271 /libavcodec/vp8.c
parentc4cccc8d3f6605c5fdd73723a865486c5b7fb117 (diff)
vp8: fix memset() crossing array boundary
Indexing across array boundaries is not allowed by C99. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 2766c9e37c..d9902c4c48 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1964,7 +1964,8 @@ static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// top edge of 127 for intra prediction
if (!(avctx->flags & CODEC_FLAG_EMU_EDGE)) {
s->top_border[0][15] = s->top_border[0][23] = 127;
- memset(s->top_border[1]-1, 127, s->mb_width*sizeof(*s->top_border)+1);
+ s->top_border[0][31] = 127;
+ memset(s->top_border[1], 127, s->mb_width*sizeof(*s->top_border));
}
memset(s->ref_count, 0, sizeof(s->ref_count));