Mercurial > cpython-lru_cache-weakref
diff Python/dynload_shlib.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 | 73a1395a2351 |
| children | 5cbcfde3ad55 |
line wrap: on
line diff
--- a/Python/dynload_shlib.c Wed Nov 28 20:37:25 2001 +0000 +++ b/Python/dynload_shlib.c Wed Nov 28 20:42:20 2001 +0000 @@ -57,11 +57,12 @@ if (strchr(pathname, '/') == NULL) { /* Prefix bare filename with "./" */ - sprintf(pathbuf, "./%-.255s", pathname); + PyOS_snprintf(pathbuf, sizeof(pathbuf), "./%-.255s", pathname); pathname = pathbuf; } - sprintf(funcname, LEAD_UNDERSCORE "init%.200s", shortname); + PyOS_snprintf(funcname, sizeof(funcname), + LEAD_UNDERSCORE "init%.200s", shortname); if (fp != NULL) { int i;
