X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=hbytes%2Fhook.c;h=76dd50576e4d5d14c2910091c4d939f6992c2fb8;hp=b49aaa1a8b9414c5de31a2193e2a23bc950e4d08;hb=ca8b96bf81245f21fe3906c71dc2994bfc5e516f;hpb=7ed5ab23c04b08d569a8515b2eab39338eddd261 diff --git a/hbytes/hook.c b/hbytes/hook.c index b49aaa1..76dd505 100644 --- a/hbytes/hook.c +++ b/hbytes/hook.c @@ -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);