chiark / gitweb /
use of int and overflow review
[chiark-tcl.git] / hbytes / hook.c
index b49aaa1a8b9414c5de31a2193e2a23bc950e4d08..b2d4dc4e1abc657da57497315d8999b1795a2363 100644 (file)
@@ -73,6 +73,7 @@ void cht_obj_updatestr_array_prefix(Tcl_Obj *o, const Byte *byte,
   int pl;
 
   pl= strlen(prefix);
+  assert(l < INT_MAX/2 - 1 - pl);
   o->length= l*2+pl;
   str= o->bytes= TALLOC(o->length+1);