From 240c35aac081c35b4b746ba43b09c13dce2f6f71 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 18 Mar 1998 17:59:20 +0000 Subject: [PATCH] Subtle fix in the read() code which could cause a read broken up in several pieces to fail... --- Objects/fileobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/fileobject.c b/Objects/fileobject.c index d07aa69e61e..51752abc131 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -469,7 +469,7 @@ file_read(f, args) if (bytesread < buffersize) break; if (bytesrequested < 0) { - buffersize = new_buffersize(f, buffersize); + buffersize = bytesread + new_buffersize(f, buffersize); if (_PyString_Resize(&v, buffersize) < 0) return NULL; }