[New-bugs-announce] [issue23790] When xdrlib.Packer().pack_string() fails, the Packer is corrupted
Oskar Hahn
report at bugs.python.org
Fri Mar 27 14:05:10 CET 2015
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 be tested to be supported, or undo the call of self.pack_uint(n).
I added two alternative patches for this two solutions.
This is my first patch for cpython, I hope it is ok.
----------
components: Library (Lib)
files: test_value.patch
keywords: patch
messages: 239396
nosy: ostcar
priority: normal
severity: normal
status: open
title: When xdrlib.Packer().pack_string() fails, the Packer is corrupted
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file38710/test_value.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23790>
_______________________________________
More information about the New-bugs-announce
mailing list