[Mesa-dev] [PATCH] mesa: Fix wrong sizeof argument in _math_matrix_copy.

Jose Fonseca jfonseca at vmware.com
Sun Jul 29 23:15:20 PDT 2012


Good catch.

Jose

----- Original Message -----
> Fixes Coverity wrong sizeof argument defect.
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/mesa/math/m_matrix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
>  }
> --
> 1.7.11.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list