diff options
-rw-r--r-- | Modules/getbuildinfo.c | 5 | ||||
-rw-r--r-- | Python/mactoolboxglue.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c index a4e9977..b59d9a7 100644 --- a/Modules/getbuildinfo.c +++ b/Modules/getbuildinfo.c @@ -1,4 +1,4 @@ -#include "pyconfig.h" +#include "Python.h" #ifdef macintosh #include "macbuildno.h" @@ -33,6 +33,7 @@ const char * Py_GetBuildInfo(void) { static char buildinfo[50]; - sprintf(buildinfo, "#%d, %.20s, %.9s", BUILD, DATE, TIME); + PyOS_snprintf(buildinfo, sizeof(buildinfo), + "#%d, %.20s, %.9s", BUILD, DATE, TIME); return buildinfo; } diff --git a/Python/mactoolboxglue.c b/Python/mactoolboxglue.c index ea21b4e..2852fde 100644 --- a/Python/mactoolboxglue.c +++ b/Python/mactoolboxglue.c @@ -91,7 +91,7 @@ char *PyMac_StrError(int err) HUnlock(h); ReleaseResource(h); } else { - sprintf(buf, "Mac OS error code %d", err); + PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err); } return buf; } |