mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -31,14 +31,14 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
|
|||
|
||||
if (rc != NO_ERROR) {
|
||||
char errBuf[256];
|
||||
sprintf(errBuf,
|
||||
"DLL load failed, rc = %d: %.200s",
|
||||
rc, failreason);
|
||||
PyOS_snprintf(errBuf, sizeof(errBuf),
|
||||
"DLL load failed, rc = %d: %.200s",
|
||||
rc, failreason);
|
||||
PyErr_SetString(PyExc_ImportError, errBuf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sprintf(funcname, "init%.200s", shortname);
|
||||
PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname);
|
||||
rc = DosQueryProcAddr(hDLL, 0L, funcname, &p);
|
||||
if (rc != NO_ERROR)
|
||||
p = NULL; /* Signify Failure to Acquire Entrypoint */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue