Merged revisions 84589 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84589 | antoine.pitrou | 2010-09-07 18:30:09 +0200 (mar., 07 sept. 2010) | 5 lines

  Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True,
  and the passed buffer was exactly 1024 bytes long, the buffer wouldn't
  be updated back after the system call.  Original patch by Brian Brazil.
........
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 63d06d3..ca52c05 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -153,7 +153,7 @@
         else {
             ret = ioctl(fd, code, arg);
         }
-        if (mutate_arg && (len < IOCTL_BUFSZ)) {
+        if (mutate_arg && (len <= IOCTL_BUFSZ)) {
             memcpy(str, buf, len);
         }
         if (ret < 0) {