mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #24917: time_strftime() Buffer Over-read. Patch by John Leitch.
This commit is contained in:
parent
ca3f435fe6
commit
0fba9b324f
2 changed files with 8 additions and 0 deletions
|
@ -662,6 +662,12 @@ time_strftime(PyObject *self, PyObject *args)
|
|||
"format %y requires year >= 1900 on AIX");
|
||||
return NULL;
|
||||
}
|
||||
else if (outbuf[1] == '\0')
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "Incomplete format string");
|
||||
Py_DECREF(format);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue