summaryrefslogtreecommitdiffstats
path: root/Python/dynload_os2.c
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-11-28 20:42:20 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-11-28 20:42:20 (GMT)
commit518ab1c02a01a1a502fedeccb62ea73f2a952ba7 (patch)
tree4fd0238c7960f0001e8b576656acbbbe0947053e /Python/dynload_os2.c
parentef58b319916f6cf2034acc40b411f8405f20416f (diff)
downloadcpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.zip
cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.gz
cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.bz2
Use PyOS_snprintf instead of sprintf.
Diffstat (limited to 'Python/dynload_os2.c')
-rw-r--r--Python/dynload_os2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/dynload_os2.c b/Python/dynload_os2.c
index a3eb468..d660e27 100644
--- a/Python/dynload_os2.c
+++ b/Python/dynload_os2.c
@@ -31,14 +31,14 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
if (rc != NO_ERROR) {
char errBuf[256];
- sprintf(errBuf,
- "DLL load failed, rc = %d: %.200s",
- rc, failreason);
+ PyOS_snprintf(errBuf, sizeof(errBuf),
+ "DLL load failed, rc = %d: %.200s",
+ rc, failreason);
PyErr_SetString(PyExc_ImportError, errBuf);
return NULL;
}
- sprintf(funcname, "init%.200s", shortname);
+ PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname);
rc = DosQueryProcAddr(hDLL, 0L, funcname, &p);
if (rc != NO_ERROR)
p = NULL; /* Signify Failure to Acquire Entrypoint */