Index: tclBinary.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBinary.c,v
retrieving revision 1.65
diff -u -r1.65 tclBinary.c
--- tclBinary.c	22 Aug 2010 18:53:26 -0000	1.65
+++ tclBinary.c	15 Sep 2010 17:29:12 -0000
@@ -623,6 +623,7 @@
 	ByteArray *tmpByteArrayPtr = NULL;
 
 	attempt = byteArrayPtr->allocated;
+	if (attempt == 0) attempt = 1;
 	do {
 	    attempt *= 2;
 	} while (attempt < used+len);
