nouveau: Copy m4x4 and m8x8 separately.
authorVinson Lee <vlee@freedesktop.org>
Sat, 17 Aug 2013 22:23:15 +0000 (15:23 -0700)
committerVinson Lee <vlee@freedesktop.org>
Thu, 29 Aug 2013 06:23:49 +0000 (23:23 -0700)
Silences Coverity "Out-of-bounds access" defect.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c

index 199c43d6d00c283f82022f8e2ce9498efa3271a5..add998d98ef5cc9e8801b4c8c30dca819696c48d 100644 (file)
@@ -363,7 +363,8 @@ nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,
    h->field_order_cnt[0] = d->field_order_cnt[0];
    h->field_order_cnt[1] = d->field_order_cnt[1];
    memset(h->refs, 0, sizeof(h->refs));
-   memcpy(h->m4x4, d->scaling_lists_4x4, sizeof(h->m4x4) + sizeof(h->m8x8));
+   memcpy(h->m4x4, d->scaling_lists_4x4, sizeof(h->m4x4));
+   memcpy(h->m8x8, d->scaling_lists_8x8, sizeof(h->m8x8));
    h->u220 = 0;
    for (i = 0; i < d->num_ref_frames; ++i) {
       if (!d->ref[i])