diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-17 19:02:45 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-17 19:02:45 (GMT) |
commit | f13572d6e40f2ab52c65ec27c65866daa4a7389e (patch) | |
tree | da2c500c8b4a246bf5aaf4f3bdf348aa5c268132 /Modules | |
parent | f48f9d38c02ef914194eeeeb6cdae770e218af00 (diff) | |
download | cpython-f13572d6e40f2ab52c65ec27c65866daa4a7389e.zip cpython-f13572d6e40f2ab52c65ec27c65866daa4a7389e.tar.gz cpython-f13572d6e40f2ab52c65ec27c65866daa4a7389e.tar.bz2 |
Use a buffer large enough to ensure we don't overrun, even if the value
is outside the range we expect.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/datetimemodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c index 89423ab..3f9e78b 100644 --- a/Modules/datetimemodule.c +++ b/Modules/datetimemodule.c @@ -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)) |