fix dstelt memory allocation to avoid hash corruption
authorRoland Scheidegger <sroland@tungstengraphics.com>
Thu, 25 Jan 2007 13:32:06 +0000 (14:32 +0100)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Thu, 25 Jan 2007 13:32:06 +0000 (14:32 +0100)
src/mesa/vbo/vbo_split_copy.c

index fff733ccb5384348376d52544f4434bb0836a1f9..df69e4ca28fb1d1db654fb274222c3b8b5007273 100644 (file)
@@ -469,7 +469,7 @@ static void replay_init( struct copy_context *copy )
                            copy->ib->count * 2);
    copy->dstelt_size = MIN2(copy->dstelt_size,
                            copy->limits->max_indices);
-   copy->dstelt = _mesa_malloc(copy->dstelt_size);
+   copy->dstelt = _mesa_malloc(sizeof(GLuint) * copy->dstelt_size);
    copy->dstelt_nr = 0;
 
    /* Setup the new index buffer to point to the allocated element