mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
This commit is contained in:
parent
5f1cfbb5c0
commit
7898043868
19 changed files with 148 additions and 24 deletions
|
@ -17,6 +17,7 @@ import stat
|
|||
import tempfile
|
||||
import unittest
|
||||
import warnings
|
||||
import _testcapi
|
||||
|
||||
_DUMMY_SYMLINK = os.path.join(tempfile.gettempdir(),
|
||||
support.TESTFN + '-dummy-symlink')
|
||||
|
@ -537,6 +538,10 @@ class PosixTester(unittest.TestCase):
|
|||
except OSError:
|
||||
pass
|
||||
|
||||
# Issue 15989
|
||||
self.assertRaises(OverflowError, os.pipe2, _testcapi.INT_MAX + 1)
|
||||
self.assertRaises(OverflowError, os.pipe2, _testcapi.UINT_MAX + 1)
|
||||
|
||||
def test_utime(self):
|
||||
if hasattr(posix, 'utime'):
|
||||
now = time.time()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue