diff options
author | Guido van Rossum <guido@python.org> | 1998-03-18 17:59:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-03-18 17:59:20 (GMT) |
commit | 240c35aac081c35b4b746ba43b09c13dce2f6f71 (patch) | |
tree | c2c1be48a94ae5003200d415ceaf26418de774aa /Objects/fileobject.c | |
parent | 3f0666c4a25b39b5a039a7f36aa4864c9c3f7217 (diff) | |
download | cpython-240c35aac081c35b4b746ba43b09c13dce2f6f71.zip cpython-240c35aac081c35b4b746ba43b09c13dce2f6f71.tar.gz cpython-240c35aac081c35b4b746ba43b09c13dce2f6f71.tar.bz2 |
Subtle fix in the read() code which could cause a read broken up in
several pieces to fail...
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index d07aa69..51752abc 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; } |