diff options
author | Georg Brandl <georg@python.org> | 2005-09-29 20:49:16 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2005-09-29 20:49:16 (GMT) |
commit | aa93517de8b5e2b41644a22ae81ddec4f5d72991 (patch) | |
tree | c6d35de0c2c00b3540ed642a4c6c95504dac808a /Lib/xdrlib.py | |
parent | 1aa74ee5c5f4647c12c21ab3f5262a33d263bb35 (diff) | |
download | cpython-aa93517de8b5e2b41644a22ae81ddec4f5d72991.zip cpython-aa93517de8b5e2b41644a22ae81ddec4f5d72991.tar.gz cpython-aa93517de8b5e2b41644a22ae81ddec4f5d72991.tar.bz2 |
patch [ 1300515 ] xdrlib.py: pack_fstring() did not use null bytes for padding
Diffstat (limited to 'Lib/xdrlib.py')
-rw-r--r-- | Lib/xdrlib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index d9d2120..47cc22b 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -79,8 +79,8 @@ class Packer: def pack_fstring(self, n, s): if n < 0: raise ValueError, 'fstring size must be nonnegative' - n = ((n+3)/4)*4 data = s[:n] + n = ((n+3)/4)*4 data = data + (n - len(data)) * '\0' self.__buf.write(data) |