bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix bug: Init auto var to unrandomize `stack_depth' rv.


From: Thien-Thi Nguyen
Subject: [PATCH] Fix bug: Init auto var to unrandomize `stack_depth' rv.
Date: Sat, 09 Jan 2010 11:01:42 +0100

Below is a revised patch, with updated ChangeLog entry
(includes "libguile/" prefix).

thi


____________________________________________________________________________
>From 666e9de72a7dbaff3ee67a77b3efc981b33c44eb Mon Sep 17 00:00:00 2001
From: Thien-Thi Nguyen <address@hidden>
Date: Sat, 9 Jan 2010 09:12:49 +0100
Subject: [PATCH] Fix bug: Init auto var to unrandomize `stack_depth' rv.

* libguile/stacks.c (stack_depth): Init `n'.

Signed-off-by: Thien-Thi Nguyen <address@hidden>
---
 libguile/stacks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libguile/stacks.c b/libguile/stacks.c
index 61b7be3..ce16063 100644
--- a/libguile/stacks.c
+++ b/libguile/stacks.c
@@ -66,7 +66,7 @@ static SCM stack_id_with_fp (SCM frame, SCM **fp);
 static long
 stack_depth (SCM frame, SCM *fp)
 {
-  long n;
+  long n = 0;
   /* count frames, skipping boot frames */
   for (; scm_is_true (frame) && SCM_VM_FRAME_FP (frame) > fp;
        frame = scm_frame_previous (frame))
-- 
1.6.3.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]