Commit aa93517d authored by Georg Brandl's avatar Georg Brandl

patch [ 1300515 ] xdrlib.py: pack_fstring() did not use null bytes for padding

parent 1aa74ee5
...@@ -79,8 +79,8 @@ class Packer: ...@@ -79,8 +79,8 @@ class Packer:
def pack_fstring(self, n, s): def pack_fstring(self, n, s):
if n < 0: if n < 0:
raise ValueError, 'fstring size must be nonnegative' raise ValueError, 'fstring size must be nonnegative'
n = ((n+3)/4)*4
data = s[:n] data = s[:n]
n = ((n+3)/4)*4
data = data + (n - len(data)) * '\0' data = data + (n - len(data)) * '\0'
self.__buf.write(data) self.__buf.write(data)
......
...@@ -242,6 +242,9 @@ Extension Modules ...@@ -242,6 +242,9 @@ Extension Modules
Library Library
------- -------
- Patch #1300515: xdrlib.py: Fix pack_fstring() to really use null bytes
for padding.
- Bug #1296004: httplib.py: Limit maximal amount of data read from the - Bug #1296004: httplib.py: Limit maximal amount of data read from the
socket to avoid a MemoryError on Windows. socket to avoid a MemoryError on Windows.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment