]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-127208: Reject null character in _imp.create_dynamic() (#127400) (#127419)
authorVictor Stinner <vstinner@python.org>
Fri, 29 Nov 2024 16:03:24 +0000 (17:03 +0100)
committerGitHub <noreply@github.com>
Fri, 29 Nov 2024 16:03:24 +0000 (17:03 +0100)
commite7ab97862deb8ad69caccbc5c6e1f7b4e670afbd
tree495760c9b12026f35c9fe4ac2c9a4ac97e603a0f
parentfc0564b3658f4bda9e808042cb9752fb56853bc1
[3.12] gh-127208: Reject null character in _imp.create_dynamic() (#127400) (#127419)

gh-127208: Reject null character in _imp.create_dynamic() (#127400)

_imp.create_dynamic() now rejects embedded null characters in the
path and in the module name.

Backport also the _PyUnicode_AsUTF8NoNUL() function.

(cherry picked from commit b14fdadc6c620875a20b7ccc3c9b069e85d8557a)
Include/internal/pycore_unicodeobject.h
Lib/test/test_import/__init__.py
Objects/unicodeobject.c
Python/import.c