summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-07-28 19:07:53 +0200
committerAndy Wingo <wingo@pobox.com>2011-07-28 19:07:53 +0200
commit7c888dfa6e67e13dd89c459df3ee28f13ab681ec (patch)
tree95fbbd1f1ccb467a8c8e3c770c1a7b0927675fb7
parenteff3dd99f757410d6ab8d7e3da0a4120d1111192 (diff)
downloadguile-7c888dfa6e67e13dd89c459df3ee28f13ab681ec.tar.gz
fix read beyond end of hashtable size array in hashtab.c
* libguile/hashtab.c (make_hash_table): Fix read beyond end of hashtable_size array. Thanks to http://article.gmane.org/gmane.lisp.guile.devel/12685.
-rw-r--r--libguile/hashtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 6141e4fd2..c4f2b5eb0 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -274,7 +274,7 @@ make_hash_table (int flags, unsigned long k, const char *func_name)
SCM vector;
scm_t_hashtable *t;
int i = 0, n = k ? k : 31;
- while (i < HASHTABLE_SIZE_N && n > hashtable_size[i])
+ while (i + 1 < HASHTABLE_SIZE_N && n > hashtable_size[i])
++i;
n = hashtable_size[i];