From 518ab1c02a01a1a502fedeccb62ea73f2a952ba7 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 28 Nov 2001 20:42:20 +0000 Subject: Use PyOS_snprintf instead of sprintf. --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index f6217c3da6..628058b8b8 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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) -- cgit v1.2.1