Mercurial > cpython-lru_cache-weakref
diff Python/getversion.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 | 6f6f965c5e2d |
| children | 9f2fbee420da |
line wrap: on
line diff
--- a/Python/getversion.c Wed Nov 28 20:37:25 2001 +0000 +++ b/Python/getversion.c Wed Nov 28 20:42:20 2001 +0000 @@ -9,7 +9,7 @@ Py_GetVersion(void) { static char version[250]; - sprintf(version, "%.80s (%.80s) %.80s", PY_VERSION, - Py_GetBuildInfo(), Py_GetCompiler()); + PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s", + PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); return version; }
