Issue #23094: Fixed readline with frames in Python implementation of pickle.

This commit is contained in:
Serhiy Storchaka 2015-01-26 10:37:01 +02:00
parent 5106d044ec
commit 21d7533c4c
3 changed files with 11 additions and 1 deletions

View file

@ -242,7 +242,7 @@ class _Unframer:
if not data:
self.current_frame = None
return self.file_readline()
if data[-1] != b'\n':
if data[-1] != b'\n'[0]:
raise UnpicklingError(
"pickle exhausted before end of frame")
return data