[issue23790] When xdrlib.Packer().pack_string() fails, the Packer is corrupted

2015-03-27 Thread Oskar Hahn
Changes by Oskar Hahn : Added file: http://bugs.python.org/file38711/reset_buffer.patch ___ Python tracker <http://bugs.python.org/issue23790> ___ ___ Python-bugs-list m

[issue23790] When xdrlib.Packer().pack_string() fails, the Packer is corrupted

2015-03-27 Thread Oskar Hahn
New submission from Oskar Hahn: When xdrlib.Packer().pack_string() is called with an unsupported value, it raises a TypeError. But it calles self.pack_uint(n) before it raises the exception so the buffer is changed. There are two possible solutions to solve this behaviour. The argument s can

[issue23790] When xdrlib.Packer().pack_string() fails, the Packer is corrupted

2015-03-27 Thread Oskar Hahn
Oskar Hahn added the comment: I would prefer the reset_buffer.patch because I do not like argument testing at the begin of a function/method. -- ___ Python tracker <http://bugs.python.org/issue23