diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-11-28 20:42:20 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-11-28 20:42:20 (GMT) |
commit | 518ab1c02a01a1a502fedeccb62ea73f2a952ba7 (patch) | |
tree | 4fd0238c7960f0001e8b576656acbbbe0947053e /Python/dynload_hpux.c | |
parent | ef58b319916f6cf2034acc40b411f8405f20416f (diff) | |
download | cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.zip cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.gz cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.bz2 |
Use PyOS_snprintf instead of sprintf.
Diffstat (limited to 'Python/dynload_hpux.c')
-rw-r--r-- | Python/dynload_hpux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/dynload_hpux.c b/Python/dynload_hpux.c index e435cd8..cbdb35a 100644 --- a/Python/dynload_hpux.c +++ b/Python/dynload_hpux.c @@ -39,11 +39,12 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, char buf[256]; if (Py_VerboseFlag) perror(pathname); - sprintf(buf, "Failed to load %.200s", pathname); + PyOS_snprintf(buf, sizeof(buf), "Failed to load %.200s", + pathname); PyErr_SetString(PyExc_ImportError, buf); return NULL; } - sprintf(funcname, FUNCNAME_PATTERN, shortname); + PyOS_snprintf(funcname, sizeof(funcname), FUNCNAME_PATTERN, shortname); if (Py_VerboseFlag) printf("shl_findsym %s\n", funcname); shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p); |