Use PyOS_snprintf instead of sprintf.

This commit is contained in:
Jeremy Hylton 2001-11-28 20:42:20 +00:00
parent ef58b31991
commit 518ab1c02a
13 changed files with 45 additions and 39 deletions

View file

@ -933,7 +933,7 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
else
PyFile_WriteString(filename, f);
PyFile_WriteString("\", line ", f);
sprintf(buf, "%d", lineno);
PyOS_snprintf(buf, sizeof(buf), "%d", lineno);
PyFile_WriteString(buf, f);
PyFile_WriteString("\n", f);
if (text != NULL)