From 518ab1c02a01a1a502fedeccb62ea73f2a952ba7 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 28 Nov 2001 20:42:20 +0000 Subject: Use PyOS_snprintf instead of sprintf. --- Python/dynload_shlib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Python/dynload_shlib.c') diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index 569a6f52ce..e8a04ce500 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; -- cgit v1.2.1