Commit 240c35aa authored by Guido van Rossum's avatar Guido van Rossum

Subtle fix in the read() code which could cause a read broken up in

several pieces to fail...
parent 3f0666c4
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment