diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-12-04 01:11:32 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-12-04 01:11:32 (GMT) |
commit | 22a51efc1cb9b3d5c945bf90fd8906306c367604 (patch) | |
tree | 2fc83a52e13b250ad757d4a056b27c555118bc04 | |
parent | b38784e4a0c51e8ca1c833ed1b9dacbc42fcb611 (diff) | |
download | cpython-22a51efc1cb9b3d5c945bf90fd8906306c367604.zip cpython-22a51efc1cb9b3d5c945bf90fd8906306c367604.tar.gz cpython-22a51efc1cb9b3d5c945bf90fd8906306c367604.tar.bz2 |
More sprintf -> PyOS_snprintf.
-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; } |