Mesa (master): mesa: Fix wrong sizeof argument in _math_matrix_copy.

Brian Paul brianp at kemper.freedesktop.org
Mon Jul 30 14:15:16 UTC 2012


Module: Mesa
Branch: master
Commit: 502c10839e53e7f7e709c10927405d1b84961b80
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=502c10839e53e7f7e709c10927405d1b84961b80

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Sun Jul 29 17:54:55 2012 -0700

mesa: Fix wrong sizeof argument in _math_matrix_copy.

Fixes Coverity wrong sizeof argument defect.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Signed-off-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/math/m_matrix.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index 40f9229..7c4e9fd 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -1437,7 +1437,7 @@ void
 _math_matrix_copy( GLmatrix *to, const GLmatrix *from )
 {
    memcpy( to->m, from->m, sizeof(Identity) );
-   memcpy(to->inv, from->inv, sizeof(from->inv));
+   memcpy(to->inv, from->inv, sizeof(*from->inv));
    to->flags = from->flags;
    to->type = from->type;
 }




More information about the mesa-commit mailing list