mirror of https://github.com/python/cpython
Replace snprintf with sprintf.
This commit is contained in:
parent
2106ef0222
commit
2b110f9713
|
@ -130,7 +130,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
|||
if (serv == NULL || servlen == 0) {
|
||||
/* what we should do? */
|
||||
} else if (flags & NI_NUMERICSERV) {
|
||||
snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
|
||||
sprintf(numserv, "%d", ntohs(port));
|
||||
if (strlen(numserv) > servlen)
|
||||
return ENI_MEMORY;
|
||||
strcpy(serv, numserv);
|
||||
|
|
Loading…
Reference in New Issue