mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue