]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832) (GH-107875)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 12 Aug 2023 11:06:56 +0000 (14:06 +0300)
committerGitHub <noreply@github.com>
Sat, 12 Aug 2023 11:06:56 +0000 (14:06 +0300)
commitec254c5dfa8c99f1ec061b252d155386e93f19ef
tree1aef80e9ec92b766c57b5dd8ba45bb8cf7edebcc
parent4ddfb042609bebe7fd1d9af5f5d7bbc781ea5b4f
[3.11] gh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832) (GH-107875)

* 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.

Now strings longer than 2**31-1 characters caused OverflowError.
(cherry picked from commit 04cc01453db2f0af72a06440831637f8bf512daf)
Lib/test/test_ntpath.py
Misc/NEWS.d/next/Windows/2023-07-18-13-01-26.gh-issue-106844.mci4xO.rst [new file with mode: 0644]
Modules/_winapi.c