summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-17 19:02:45 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-17 19:02:45 (GMT)
commitf13572d6e40f2ab52c65ec27c65866daa4a7389e (patch)
treeda2c500c8b4a246bf5aaf4f3bdf348aa5c268132 /Modules
parentf48f9d38c02ef914194eeeeb6cdae770e218af00 (diff)
downloadcpython-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.c2
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))