]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 31 Jul 2018 09:20:06 +0000 (02:20 -0700)
committerGitHub <noreply@github.com>
Tue, 31 Jul 2018 09:20:06 +0000 (02:20 -0700)
commit3e4b68875917a4605b45918f9e3232730fed9399
tree23ec6966989c562b3aaedabee8ea21cd2f1980a3
parent47957dab94a4efa2fee61c9a8193f78300950769
bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931)

* Fix integer overflow in os.readv(), os.writev(), os.preadv()
  and os.pwritev() and in os.sendfile() with headers or trailers
  arguments (on BSD-based OSes and MacOS).

* Fix sending the part of the file in os.sendfile() on MacOS.
  Using the trailers argument could cause sending more bytes from
  the input file than was specified.

Thanks Ned Deily for testing on 32-bit MacOS.
(cherry picked from commit 9d5727326af53ddd91016d98e16ae7cf829caa95)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_os.py
Lib/test/test_posix.py
Misc/NEWS.d/next/Library/2018-06-26-19-03-56.bpo-33871.XhlrGU.rst [new file with mode: 0644]
Misc/NEWS.d/next/Security/2018-06-26-19-35-33.bpo-33871.S4HR9n.rst [new file with mode: 0644]
Modules/posixmodule.c