Mesa (glsl2): glsl2: Fix stack smash when ternary selection is used.

Eric Anholt anholt at kemper.freedesktop.org
Sat Jul 31 20:00:38 UTC 2010


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

Author: Aras Pranckevicius <aras at unity3d.com>
Date:   Thu Jul 29 15:35:22 2010 +0300

glsl2: Fix stack smash when ternary selection is used.

---

 src/glsl/ast_to_hir.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 9591d36..3522f55 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -658,7 +658,7 @@ ast_expression::hir(exec_list *instructions,
       -1,               /* ast_sequence doesn't convert to ir_expression. */
    };
    ir_rvalue *result = NULL;
-   ir_rvalue *op[2];
+   ir_rvalue *op[3];
    const struct glsl_type *type = glsl_type::error_type;
    bool error_emitted = false;
    YYLTYPE loc;




More information about the mesa-commit mailing list