mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for NULL
This commit is contained in:
parent
1b2bd3b348
commit
e239d23e8c
13 changed files with 144 additions and 78 deletions
|
|
@ -1257,7 +1257,8 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
|
|||
assert(PyUnicode_Check(Zreplacement));
|
||||
ptoappend = _PyUnicode_AsStringAndSize(Zreplacement,
|
||||
&ntoappend);
|
||||
ntoappend = Py_SIZE(Zreplacement);
|
||||
if (ptoappend == NULL)
|
||||
goto Done;
|
||||
}
|
||||
else if (ch == 'f') {
|
||||
/* format microseconds */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue