summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-04-04 08:53:57 -0400
committerRob Clark <[email protected]>2017-04-07 08:23:02 -0400
commit7c69ea553bfa8e23feedc5d3f479a9003c139bad (patch)
tree1b8480bf25c969834ad4f29362341737e1914f94 /src/gallium/auxiliary
parent8046a944d084b4ae4e70e61ba50846fd1943247f (diff)
gallium/util: fix missing limit check in libunwind backtrace
Fixes: 70c272004f ("gallium/util: libunwind support") Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_debug_stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/gallium/auxiliary/util/u_debug_stack.c
index cf05f13ddd0..14d5b16c376 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;