◐ Shell
reader mode source ↗

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients alexandre.vassalotti, pitrou, serhiy.storchaka
Date 2013-04-13.11:00:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import cPickle
>>> cPickle.loads(b"S' \np0\n.")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: Negative size passed to PyString_FromStringAndSize
>>> pickle.loads(b"S' \np0\n.")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython2.7/Lib/pickle.py", line 1382, in loads
    return Unpickler(file).load()
  File "/home/serhiy/py/cpython2.7/Lib/pickle.py", line 858, in load
    dispatch[key](self)
  File "/home/serhiy/py/cpython2.7/Lib/pickle.py", line 966, in load_string
    raise ValueError, "insecure string pickle"
ValueError: insecure string pickle
>>> cPickle.loads(b"S'\np0\n.")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: Negative size passed to PyString_FromStringAndSize
>>> pickle.loads(b"S'\np0\n.")
''

Python 3 has the same behavior except C implementation raises UnpicklingError for b"S'\np0\n.".
History
Date User Action Args
2013-04-13 11:00:22serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, alexandre.vassalotti
2013-04-13 11:00:22serhiy.storchakasetmessageid: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za>
2013-04-13 11:00:21serhiy.storchakalinkissue17710 messages
2013-04-13 11:00:21serhiy.storchakacreate