diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-06-27 18:08:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 18:08:58 (GMT) |
commit | 0edffa3073b551ffeca34952529e7b292f1bd350 (patch) | |
tree | dcbf750061bcbe9da3ae9401292185b44490bb4b /PC/winsound.c | |
parent | 35d2ca2b94a6ff29e763ddb7727166f0592edfa2 (diff) | |
download | cpython-0edffa3073b551ffeca34952529e7b292f1bd350.zip cpython-0edffa3073b551ffeca34952529e7b292f1bd350.tar.gz cpython-0edffa3073b551ffeca34952529e7b292f1bd350.tar.bz2 |
[3.6] bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (GH-2285) (#2443)
Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters..
(cherry picked from commit e613e6add5f07ff6aad5802924596b631b707d2a)
Diffstat (limited to 'PC/winsound.c')
-rw-r--r-- | PC/winsound.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/winsound.c b/PC/winsound.c index 7feebcb..0d3f045 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -101,7 +101,7 @@ winsound_PlaySound_impl(PyObject *module, PyObject *sound, int flags) Py_TYPE(sound)->tp_name); return NULL; } - wsound = PyUnicode_AsWideCharString(sound, NULL); + wsound = _PyUnicode_AsWideCharString(sound); if (wsound == NULL) { return NULL; } |