Commit 5d7c1b1a authored by Brett Cannon's avatar Brett Cannon

merge for issue #18556

parents b41803e3 845f7845
......@@ -166,6 +166,9 @@ Core and Builtins
Library
-------
- Issue #18556: Check the return type of PyUnicode_AsWideChar() in ctype's
U_set().
- Issue #17818: aifc.getparams now returns a namedtuple.
- Issue #18549: Eliminate dead code in socket_ntohl()
......
......@@ -1260,7 +1260,11 @@ U_set(void *ptr, PyObject *value, Py_ssize_t length)
} else if (size < length-1)
/* copy terminating NUL character if there is space */
size += 1;
PyUnicode_AsWideChar(value, (wchar_t *)ptr, size);
if (PyUnicode_AsWideChar(value, (wchar_t *)ptr, size) == -1) {
return NULL;
}
return value;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment