mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
gh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832)
* Strings with length from 2**31-1 to 2**32-2 always caused MemoryError, it doesn't matter how much memory is available. * Strings with length exactly 2**32-1 caused OSError. * Strings longer than 2**32-1 characters were truncated due to integer overflow bug. * Strings containing the null character were truncated at the first null character. Now strings longer than 2**31-1 characters caused OverflowError and the null character is allowed.
This commit is contained in:
parent
a39f0a3506
commit
04cc01453d
4 changed files with 32 additions and 16 deletions
|
@ -1036,6 +1036,7 @@ class PathLikeTests(NtpathTestCase):
|
|||
self._check_function(self.path.normcase)
|
||||
if sys.platform == 'win32':
|
||||
self.assertEqual(ntpath.normcase('\u03a9\u2126'), 'ωΩ')
|
||||
self.assertEqual(ntpath.normcase('abc\x00def'), 'abc\x00def')
|
||||
|
||||
def test_path_isabs(self):
|
||||
self._check_function(self.path.isabs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue