]> granicus.if.org Git - python/commit
bpo-24658: os.read() reuses _PY_READ_MAX (GH-10657)
authorVictor Stinner <vstinner@redhat.com>
Thu, 22 Nov 2018 14:03:40 +0000 (15:03 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Nov 2018 14:03:40 +0000 (15:03 +0100)
commit9a0d7a7648547ffb77144bf2480155f6d7940dea
tree4972ec72abbb88219f7843aab4d050b90b8427c0
parent4d73ae776140a583fdfe8f016d88cc767791e481
bpo-24658: os.read() reuses _PY_READ_MAX (GH-10657)

os_read_impl() now also truncates the size to _PY_READ_MAX
on macOS, to avoid to allocate a larger buffer even if _Py_read() is
limited to _PY_READ_MAX bytes (ex: INT_MAX on macOS).
Modules/posixmodule.c