diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-07 16:32:28 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-07 16:32:28 (GMT) |
commit | 334e0dde1dfbb122bbeeeb45f05fe0b438f2698a (patch) | |
tree | ae7836ff1772cfd676a65fa7b2ff4daa25cb235c /Modules/fcntlmodule.c | |
parent | 15db1443aeac81fc8587409ab9eafbbde8c093e1 (diff) | |
download | cpython-334e0dde1dfbb122bbeeeb45f05fe0b438f2698a.zip cpython-334e0dde1dfbb122bbeeeb45f05fe0b438f2698a.tar.gz cpython-334e0dde1dfbb122bbeeeb45f05fe0b438f2698a.tar.bz2 |
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.
........
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r-- | Modules/fcntlmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index 5bf4010..6eb3a2a 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -157,7 +157,7 @@ fcntl_ioctl(PyObject *self, PyObject *args) else { ret = ioctl(fd, code, arg); } - if (mutate_arg && (len < IOCTL_BUFSZ)) { + if (mutate_arg && (len <= IOCTL_BUFSZ)) { memcpy(str, buf, len); } PyBuffer_Release(&pstr); /* No further access to str below this point */ |