Module: Mesa Branch: master Commit: 1d01429c6a1ae679d0cc0cb61db1948fca5ced4c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d01429c6a1ae679d0cc0cb61db1948fca5ced4c
Author: Mathias Fröhlich <[email protected]> Date: Sat Jan 28 18:55:08 2012 +0100 state_stracker: Fix access to uninitialized memory. Fix an access to uninitialized memory pointed out by valgrind in glsl_to_tgsi_visitor::simplify_cmp(void). Note: This is a candidate for the 8.0 branch. Signed-off-by: Mathias Fröhlich <[email protected]> --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 188e8d9..ab05896 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2978,7 +2978,7 @@ glsl_to_tgsi_visitor::simplify_cmp(void) if (!tempWrites) { return; } - memset(tempWrites, 0, sizeof(tempWrites)); + memset(tempWrites, 0, sizeof(unsigned) * MAX_TEMPS); memset(outputWrites, 0, sizeof(outputWrites)); foreach_iter(exec_list_iterator, iter, this->instructions) { _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
