Mesa (gallium-0.1): pipebuffer: Fix buffer overflow.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Nov 25 06:49:19 UTC 2008


Module: Mesa
Branch: gallium-0.1
Commit: 55839ae064d64b7fcc180fcddb364bf31ab760dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=55839ae064d64b7fcc180fcddb364bf31ab760dc

Author: José Fonseca <jrfonseca at tungstengraphics.com>
Date:   Tue Nov 25 14:01:40 2008 +0900

pipebuffer: Fix buffer overflow.

---

 src/gallium/auxiliary/pipebuffer/pb_validate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.c b/src/gallium/auxiliary/pipebuffer/pb_validate.c
index 726ae16..94532bb 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_validate.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_validate.c
@@ -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;




More information about the mesa-commit mailing list