Index: tclBinary.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBinary.c,v
retrieving revision 1.51
diff -u -r1.51 tclBinary.c
--- tclBinary.c	16 Nov 2008 17:17:44 -0000	1.51
+++ tclBinary.c	12 Dec 2008 00:08:31 -0000
@@ -2516,7 +2516,9 @@
 	*cursor++ = (((d[2] - 0x20) & 0x3f) << 6)
 		| (((d[3] - 0x20) & 0x3f));
     }
-    Tcl_SetByteArrayLength(resultObj, cursor - begin - cut);
+    size = cursor - begin - cut;
+    if (size<0) size=0; /* FIXME: may happen in non-strict case */
+    Tcl_SetByteArrayLength(resultObj, size);
     Tcl_SetObjResult(interp, resultObj);
     return TCL_OK;
 
