patch [ 1300515 ] xdrlib.py: pack_fstring() did not use null bytes for padding
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 @@
     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)