chiark / gitweb /
copyright dates
[chiark-tcl.git] / hbytes / hook.c
index b49aaa1a8b9414c5de31a2193e2a23bc950e4d08..76dd50576e4d5d14c2910091c4d939f6992c2fb8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * hbytes - hex-stringrep efficient byteblocks for Tcl
- * Copyright 2006 Ian Jackson
+ * Copyright 2006-2012 Ian Jackson
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -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);