diff options
Diffstat (limited to 'Python/dynload_shlib.c')
| -rw-r--r-- | Python/dynload_shlib.c | 5 | 
1 files changed, 3 insertions, 2 deletions
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;  | 
