chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
@@ -2,9 +2,13 @@
[chiark-tcl.git]
/
base
/
idtable.c
diff --git
a/base/idtable.c
b/base/idtable.c
index 389151e2c5a75096a669c37200f2adbc28c626f7..b228a725f69c8387c7b05fcd80f825468eb0f200 100644
(file)
--- a/
base/idtable.c
+++ b/
base/idtable.c
@@
-147,6
+147,7
@@
Tcl_Obj *cht_ret_iddata(Tcl_Interp *ip, void *val, const IdDataSpec *idds) {
if (ix==-1) {
for (ix=0; ix<assoc->n && assoc->a[ix]; ix++);
if (ix>=assoc->n) {
+ assert(assoc->n < INT_MAX/4);
assoc->n += 2;
assoc->n *= 2;
assoc->a= TREALLOC(assoc->a, assoc->n*sizeof(*assoc->a));