summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-04-12 04:26:43 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-04-12 04:26:43 (GMT)
commita1c7e727c8fd9a9bf924ecc20c7d6892d19aa99e (patch)
treeeb7fd0928896a5ec14f0d485cd18dc6bea573cd9 /Modules/posixmodule.c
parent8fc8980c96f58a7f06e4e3133735807bd245c658 (diff)
downloadcpython-a1c7e727c8fd9a9bf924ecc20c7d6892d19aa99e.zip
cpython-a1c7e727c8fd9a9bf924ecc20c7d6892d19aa99e.tar.gz
cpython-a1c7e727c8fd9a9bf924ecc20c7d6892d19aa99e.tar.bz2
Issue #23668: Suppresses invalid parameter handler around chsize calls.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index fcabadd..82eae5e 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -8803,11 +8803,13 @@ os_ftruncate_impl(PyModuleDef *module, int fd, Py_off_t length)
do {
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
result = _chsize_s(fd, length);
#else
result = ftruncate(fd, length);
#endif
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
} while (result != 0 && errno == EINTR &&
!(async_err = PyErr_CheckSignals()));
@@ -8843,6 +8845,7 @@ os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length)
return os_ftruncate_impl(module, path->fd, length);
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
if (path->wide)
fd = _wopen(path->wide, _O_WRONLY | _O_BINARY | _O_NOINHERIT);
@@ -8859,6 +8862,7 @@ os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length)
#else
result = truncate(path->narrow, length);
#endif
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
if (result < 0)
return path_error(path);