diff Python/bltinmodule.c @ 21077:379fc66f4c96 legacy-trunk

Use PyOS_snprintf instead of sprintf.
author Jeremy Hylton <jeremy@alum.mit.edu>
date Wed, 28 Nov 2001 20:42:20 +0000
parents f576ffd57966
children de125792bfaa
line wrap: on
line diff
--- a/Python/bltinmodule.c	Wed Nov 28 20:37:25 2001 +0000
+++ b/Python/bltinmodule.c	Wed Nov 28 20:42:20 2001 +0000
@@ -779,7 +779,7 @@
 			static char errmsg[] =
 			    "argument %d to map() must support iteration";
 			char errbuf[sizeof(errmsg) + 25];
-			sprintf(errbuf, errmsg, i+2);
+			PyOS_snprintf(errbuf, sizeof(errbuf), errmsg, i+2);
 			PyErr_SetString(PyExc_TypeError, errbuf);
 			goto Fail_2;
 		}