summaryrefslogtreecommitdiffstats
path: root/RISCOS/Python
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 /RISCOS/Python
parentef58b319916f6cf2034acc40b411f8405f20416f (diff)
downloadcpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.zip
cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.gz
cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.bz2
Use PyOS_snprintf instead of sprintf.
Diffstat (limited to 'RISCOS/Python')
-rw-r--r--RISCOS/Python/dynload_riscos.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/RISCOS/Python/dynload_riscos.c b/RISCOS/Python/dynload_riscos.c
index 6965647..6b87f2d 100644
--- a/RISCOS/Python/dynload_riscos.c
+++ b/RISCOS/Python/dynload_riscos.c
@@ -55,10 +55,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
void (*init_function)(void);
err = dlk_load_no_init(pathname, &init_function);
- if (err)
- {
- sprintf(errstr, "dlk failure %d", err);
- PyErr_SetString(PyExc_ImportError, errstr);
+ if (err) {
+ PyOS_snprintf(errstr, sizeof(errstr), "dlk failure %d", err);
+ PyErr_SetString(PyExc_ImportError, errstr);
}
return init_function;
}