mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #11286: Fixed unpickling of empty 2.x strings.
This commit is contained in:
parent
6c3787cb70
commit
1ce92dc20d
4 changed files with 12 additions and 13 deletions
|
|
@ -977,11 +977,6 @@ _Unpickler_Read(UnpicklerObject *self, char **s, Py_ssize_t n)
|
|||
{
|
||||
Py_ssize_t num_read;
|
||||
|
||||
if (n == 0) {
|
||||
*s = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (self->next_read_idx + n <= self->input_len) {
|
||||
*s = self->input_buffer + self->next_read_idx;
|
||||
self->next_read_idx += n;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue