pipebuffer: Fix buffer overflow.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 25 Nov 2008 05:01:40 +0000 (14:01 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 25 Nov 2008 06:49:23 +0000 (15:49 +0900)
src/gallium/auxiliary/pipebuffer/pb_validate.c

index 726ae1688e12ce8f26249daf9067a89189b3c362..94532bb4cec85978adcfdc140828c90bf85f1c4f 100644 (file)
@@ -182,7 +182,7 @@ pb_validate_create()
       return NULL;
    
    vl->size = PB_VALIDATE_INITIAL_SIZE;
-   vl->entries = (struct pb_validate_entry *)CALLOC(vl->size, sizeof(struct pb_buffer *));
+   vl->entries = (struct pb_validate_entry *)CALLOC(vl->size, sizeof(struct pb_validate_entry));
    if(!vl->entries) {
       FREE(vl);
       return NULL;