◐ Shell
reader mode source ↗
Skip to content

bpo-30708: Check for null characters in PyUnicode_AsWideCharString().#2285

Merged
serhiy-storchaka merged 4 commits into
python:masterfrom
serhiy-storchaka:PyUnicode_AsWideCharString-null-wchars
Jun 27, 2017
Merged

bpo-30708: Check for null characters in PyUnicode_AsWideCharString().#2285
serhiy-storchaka merged 4 commits into
python:masterfrom
serhiy-storchaka:PyUnicode_AsWideCharString-null-wchars

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 20, 2017

Copy link
Copy Markdown
Member

Raise a ValueError if the second argument is NULL and the wchar_t*
string contains null characters.

Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters.
@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Jun 20, 2017
@mention-bot

Copy link
Copy Markdown

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @birkenfeld, @zooba and @bitdancer to be potential reviewers.

@serhiy-storchaka serhiy-storchaka merged commit e613e6a into python:master Jun 27, 2017
@serhiy-storchaka serhiy-storchaka deleted the PyUnicode_AsWideCharString-null-wchars branch June 27, 2017 13:08
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 27, 2017
…ing(). (pythonGH-2285)

Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters..
(cherry picked from commit e613e6a)
serhiy-storchaka added a commit that referenced this pull request Jun 27, 2017
…ing(). (GH-2285) (#2443)

Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters..
(cherry picked from commit e613e6a)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 27, 2017
…harString(). (pythonGH-2285) (pythonGH-2443)

Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters..
(cherry picked from commit e613e6a).
(cherry picked from commit 0edffa3)
serhiy-storchaka added a commit that referenced this pull request Jun 27, 2017
…ng(). (GH-2285) (GH-2443)  (#2448)

And use it instead of PyUnicode_AsWideCharString() if appropriate.

_PyUnicode_AsWideCharString(unicode) is like PyUnicode_AsWideCharString(unicode, NULL), but
raises a ValueError if the wchar_t* string contains null characters.
(cherry picked from commit e613e6a).
(cherry picked from commit 0edffa3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants