mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Use a buffer large enough to ensure we don't overrun, even if the value
is outside the range we expect.
This commit is contained in:
parent
f48f9d38c0
commit
f13572d6e4
1 changed files with 1 additions and 1 deletions
|
@ -1133,7 +1133,7 @@ format_utcoffset(char *buf, size_t buflen, const char *sep,
|
|||
static PyObject *
|
||||
make_freplacement(PyObject *object)
|
||||
{
|
||||
char freplacement[7];
|
||||
char freplacement[64];
|
||||
if (PyTime_Check(object))
|
||||
sprintf(freplacement, "%06d", TIME_GET_MICROSECOND(object));
|
||||
else if (PyDateTime_Check(object))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue