mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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.
This commit is contained in:
parent
eff3dd99f7
commit
7c888dfa6e
1 changed files with 1 additions and 1 deletions
|
@ -274,7 +274,7 @@ make_hash_table (int flags, unsigned long k, const char *func_name)
|
||||||
SCM vector;
|
SCM vector;
|
||||||
scm_t_hashtable *t;
|
scm_t_hashtable *t;
|
||||||
int i = 0, n = k ? k : 31;
|
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;
|
++i;
|
||||||
n = hashtable_size[i];
|
n = hashtable_size[i];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue