mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Subtle fix in the read() code which could cause a read broken up in
several pieces to fail...
This commit is contained in:
parent
3f0666c4a2
commit
240c35aac0
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue