Mesa (master): gallium/util: fix missing limit check in libunwind backtrace

Rob Clark robclark at kemper.freedesktop.org
Fri Apr 7 12:23:22 UTC 2017


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

Author: Rob Clark <robdclark at gmail.com>
Date:   Tue Apr  4 08:53:57 2017 -0400

gallium/util: fix missing limit check in libunwind backtrace

Fixes: 70c272004f ("gallium/util: libunwind support")
Signed-off-by: Rob Clark <robdclark at gmail.com>

---

 src/gallium/auxiliary/util/u_debug_stack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/gallium/auxiliary/util/u_debug_stack.c
index cf05f13ddd..14d5b16c37 100644
--- a/src/gallium/auxiliary/util/u_debug_stack.c
+++ b/src/gallium/auxiliary/util/u_debug_stack.c
@@ -62,7 +62,7 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace,
    while ((start_frame > 0) && (unw_step(&cursor) > 0))
       start_frame--;
 
-   while (unw_step(&cursor) > 0) {
+   while ((i < nr_frames) && (unw_step(&cursor) > 0)) {
       char procname[256];
       const char *filename;
       unw_word_t off;




More information about the mesa-commit mailing list