summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-06-27 18:08:58 (GMT)
committerGitHub <noreply@github.com>2017-06-27 18:08:58 (GMT)
commit0edffa3073b551ffeca34952529e7b292f1bd350 (patch)
treedcbf750061bcbe9da3ae9401292185b44490bb4b /Modules/timemodule.c
parent35d2ca2b94a6ff29e763ddb7727166f0592edfa2 (diff)
downloadcpython-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 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 328b84f..d6c34b9 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -607,7 +607,7 @@ time_strftime(PyObject *self, PyObject *args)
buf.tm_isdst = 1;
#ifdef HAVE_WCSFTIME
- format = PyUnicode_AsWideCharString(format_arg, NULL);
+ format = _PyUnicode_AsWideCharString(format_arg);
if (format == NULL)
return NULL;
fmt = format;