diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-11-28 20:42:20 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-11-28 20:42:20 +0000 |
commit | 518ab1c02a01a1a502fedeccb62ea73f2a952ba7 (patch) | |
tree | 4fd0238c7960f0001e8b576656acbbbe0947053e /Python/dynload_shlib.c | |
parent | Use PyOS_snprintf instead of sprintf. (diff) | |
download | cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.gz cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.bz2 cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.zip |
Use PyOS_snprintf instead of sprintf.
Diffstat (limited to 'Python/dynload_shlib.c')
-rw-r--r-- | Python/dynload_shlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index 569a6f52ce8..e8a04ce500a 100644 --- a/Python/dynload_shlib.c +++ b/Python/dynload_shlib.c @@ -57,11 +57,12 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, 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; |