diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2011-08-11 21:15:53 +0200 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-08-11 21:15:53 +0200 |
| commit | fdf4a274220d3167234792e91f29eb935c78e15d (patch) | |
| tree | d53b0ba4d92dc42397796625ff1e262caada3d14 /Modules | |
| parent | 49281076c1dcc3d8d7b5592a49dd9c65c1e6b8a4 (diff) | |
| parent | f6c7a8595ea77a2a470309127752432df2f6e872 (diff) | |
| download | cpython-git-fdf4a274220d3167234792e91f29eb935c78e15d.tar.gz | |
Issue #12687: Fix a possible buffering bug when unpickling text mode (protocol 0, mostly) pickles.
Diffstat (limited to 'Modules')
| -rw-r--r-- | Modules/_pickle.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 06bce1e6e3..f147e3ec3c 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -1034,9 +1034,8 @@ _Unpickler_Readline(UnpicklerObject *self, char **result) num_read = _Unpickler_ReadFromFile(self, READ_WHOLE_LINE); if (num_read < 0) return -1; - *result = self->input_buffer; self->next_read_idx = num_read; - return num_read; + return _Unpickler_CopyLine(self, self->input_buffer, num_read, result); } /* If we get here, we've run off the end of the input string. Return the |
