Use PyOS_snprintf instead of sprintf.
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 569a6f5..e8a04ce 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -57,11 +57,12 @@
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;