From 53a468dd8c2d8a6552b1b7ed4025414fc219d21d Mon Sep 17 00:00:00 2001 From: Michael Gran Date: Thu, 20 Aug 2009 07:23:22 -0700 Subject: [PATCH] type limits error in string-tabulate * libguile/srfi-13.c (scm_string_tabulate): test range of signed integer before casting it to unsigned size_t --- libguile/srfi-13.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguile/srfi-13.c b/libguile/srfi-13.c index 1eb456322..4faa377d0 100644 --- a/libguile/srfi-13.c +++ b/libguile/srfi-13.c @@ -227,8 +227,8 @@ SCM_DEFINE (scm_string_tabulate, "string-tabulate", 2, 0, 0, proc_tramp = scm_trampoline_1 (proc); SCM_ASSERT (proc_tramp, proc, SCM_ARG1, FUNC_NAME); + SCM_ASSERT_RANGE (2, len, scm_to_int (len) >= 0); clen = scm_to_size_t (len); - SCM_ASSERT_RANGE (2, len, clen >= 0); { /* This function is more complicated than necessary for the sake -- 2.20.1