--- tcl8.5.15/generic/tclIO.c-orig	2013-11-12 19:10:46.000000000 +0100
+++ tcl8.5.15/generic/tclIO.c	2013-11-12 19:27:56.000000000 +0100
@@ -5594,9 +5594,16 @@
 	 * larger.
 	 */
 
-	length = offset * 2;
 	if (offset < toRead) {
 	    length = offset + toRead + 1;
+	} else {
+	    length = offset * 2;
+	}
+	if (length < 0) {
+	    if (((unsigned long)offset + toRead) > INT_MAX) {
+		Tcl_Panic( "file to large");
+	    }
+	    length = INT_MAX;
 	}
 	dst = (char *) Tcl_SetByteArrayLength(objPtr, length);
     }
