Module: Demos
Branch: master
Commit: ad8255ea2c0b9da0a91060316257ad1953f5efc0
URL:    
http://cgit.freedesktop.org/mesa/demos/commit/?id=ad8255ea2c0b9da0a91060316257ad1953f5efc0

Author: Marek Olšák <[email protected]>
Date:   Thu Jan 31 13:20:56 2013 +0100

glxinfo: fix segfault

---

 src/xdemos/glxinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/xdemos/glxinfo.c b/src/xdemos/glxinfo.c
index bb9e100..8449171 100644
--- a/src/xdemos/glxinfo.c
+++ b/src/xdemos/glxinfo.c
@@ -282,7 +282,7 @@ build_core_profile_extension_list(void)
       totalLen += strlen(ext) + 1; /* plus a space */
    }
 
-   buffer = malloc(totalLen);
+   buffer = malloc(totalLen + 1);
    if (buffer) {
       int pos = 0;
       for (i = 0; i < n; i++) {

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to