Mesa (master): mesa: fix out of bounds array access in rtgc debug code

Brian Paul brianp at kemper.freedesktop.org
Thu Aug 4 21:34:54 UTC 2011


Module: Mesa
Branch: master
Commit: 1c8d079e205919b24e04efdc2421c18d03f078ff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c8d079e205919b24e04efdc2421c18d03f078ff

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Aug  4 15:32:09 2011 -0600

mesa: fix out of bounds array access in rtgc debug code

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39841
This would only be hit if someone set RGTC_DEBUG=1.

---

 src/mesa/main/texcompress_rgtc_tmp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texcompress_rgtc_tmp.h b/src/mesa/main/texcompress_rgtc_tmp.h
index c8bf082..48bbd37 100644
--- a/src/mesa/main/texcompress_rgtc_tmp.h
+++ b/src/mesa/main/texcompress_rgtc_tmp.h
@@ -181,7 +181,7 @@ static void TAG(encode_rgtc_chan)(TYPE *blkaddr, TYPE srccolors[4][4],
       fprintf(stderr, "%d ", alphaenc1[i]);
    }
    fprintf(stderr, "cutVals ");
-   for (i = 0; i < 8; i++) {
+   for (i = 0; i < 7; i++) {
       fprintf(stderr, "%d ", acutValues[i]);
    }
    fprintf(stderr, "srcVals ");




More information about the mesa-commit mailing list