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 <rep...@bugs.python.org>
<http://bugs.python.org/issue23790>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to