More sprintf -> PyOS_snprintf.

This commit is contained in:
Tim Peters 2001-11-28 22:07:30 +00:00
parent 179c48c60e
commit 75cdad5584
5 changed files with 14 additions and 9 deletions

View file

@ -3089,7 +3089,8 @@ OS2init(void)
return 1; /* Indicate Success */
}
sprintf(reason, "OS/2 TCP/IP Error# %d", sock_errno());
PyOS_snprintf(reason, sizeof(reason),
"OS/2 TCP/IP Error# %d", sock_errno());
PyErr_SetString(PyExc_ImportError, reason);
return 0; /* Indicate Failure */