]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-154176: Fix locale.strxfrm() crash on DragonFly BSD (GH-154177) (GH-154217)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 Jul 2026 08:15:34 +0000 (10:15 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 08:15:34 +0000 (11:15 +0300)
commit2e4a1fa41dab372af40aa886079b14d61db42c98
tree4a8fe297cca6a53be1ad12c9ab22d889826391c3
parent346c7afa7fef25289d4d9c892b555f6cb6894cef
[3.15] gh-154176: Fix locale.strxfrm() crash on DragonFly BSD (GH-154177) (GH-154217)

Query the result size with a real one-element buffer instead of
wcsxfrm(NULL, s, 0): DragonFly BSD's wcsxfrm() crashes when the
destination is NULL or the size is 0.
(cherry picked from commit f389b03f9f2768342bfd49987a257460d4aa4faf)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Misc/NEWS.d/next/Library/2026-07-19-21-30-00.gh-issue-154176.strxfrm.rst [new file with mode: 0644]
Modules/_localemodule.c