Mesa (master): nouveau: Copy m4x4 and m8x8 separately.
Vinson Lee
vlee at kemper.freedesktop.org
Thu Aug 29 06:24:31 UTC 2013
Module: Mesa
Branch: master
Commit: 57684d52e9a37a73dbcb6c71d04ea776b08bd003
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=57684d52e9a37a73dbcb6c71d04ea776b08bd003
Author: Vinson Lee <vlee at freedesktop.org>
Date: Sat Aug 17 15:23:15 2013 -0700
nouveau: Copy m4x4 and m8x8 separately.
Silences Coverity "Out-of-bounds access" defect.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
index 199c43d..add998d 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
@@ -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])
More information about the mesa-commit
mailing list