On Mon, Jul 30, 2012 at 8:17 AM, Brian Paul <brian.e.p...@gmail.com> wrote:
> On Mon, Jul 30, 2012 at 7:59 AM, Brian Paul <brian.e.p...@gmail.com> wrote:
>> On Sun, Jul 29, 2012 at 6:54 PM, Vinson Lee <v...@freedesktop.org> wrote:
>>> Fixes Coverity wrong sizeof argument defect.
>>>
>>> Signed-off-by: Vinson Lee <v...@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;
>>>  }
>
> Vinson, I've pushed your patch since there was already a bug report about 
> this.

Ugh, I didn't review your patch carefully enough.  It's not right
either.  sizeof(*m->inv) is only 4 bytes.  We want to copy 16 floats.
 I'll fix it.

-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to