mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Use PyOS_snprintf instead of sprintf.
This commit is contained in:
parent
ef58b31991
commit
518ab1c02a
13 changed files with 45 additions and 39 deletions
|
@ -39,11 +39,12 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
|
|||
char buf[256];
|
||||
if (Py_VerboseFlag)
|
||||
perror(pathname);
|
||||
sprintf(buf, "Failed to load %.200s", pathname);
|
||||
PyOS_snprintf(buf, sizeof(buf), "Failed to load %.200s",
|
||||
pathname);
|
||||
PyErr_SetString(PyExc_ImportError, buf);
|
||||
return NULL;
|
||||
}
|
||||
sprintf(funcname, FUNCNAME_PATTERN, shortname);
|
||||
PyOS_snprintf(funcname, sizeof(funcname), FUNCNAME_PATTERN, shortname);
|
||||
if (Py_VerboseFlag)
|
||||
printf("shl_findsym %s\n", funcname);
|
||||
shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue