[Python-checkins] r61450 - python/trunk/Modules/datetimemodule.c

neal.norwitz python-checkins at python.org
Mon Mar 17 20:02:45 CET 2008


Author: neal.norwitz
Date: Mon Mar 17 20:02:45 2008
New Revision: 61450

Modified:
   python/trunk/Modules/datetimemodule.c
Log:
Use a buffer large enough to ensure we don't overrun, even if the value
is outside the range we expect.


Modified: python/trunk/Modules/datetimemodule.c
==============================================================================
--- python/trunk/Modules/datetimemodule.c	(original)
+++ python/trunk/Modules/datetimemodule.c	Mon Mar 17 20:02:45 2008
@@ -1133,7 +1133,7 @@
 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))


More information about the Python-checkins mailing list