summaryrefslogtreecommitdiffstats
path: root/Python/traceback.c
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-11-28 20:42:20 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-11-28 20:42:20 (GMT)
commit518ab1c02a01a1a502fedeccb62ea73f2a952ba7 (patch)
tree4fd0238c7960f0001e8b576656acbbbe0947053e /Python/traceback.c
parentef58b319916f6cf2034acc40b411f8405f20416f (diff)
downloadcpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.zip
cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.gz
cpython-518ab1c02a01a1a502fedeccb62ea73f2a952ba7.tar.bz2
Use PyOS_snprintf instead of sprintf.
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 6abde64..fee9d12 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -195,7 +195,7 @@ tb_displayline(PyObject *f, char *filename, int lineno, char *name)
}
}
}
- sprintf(linebuf, FMT, filename, lineno, name);
+ PyOS_snprintf(linebuf, sizeof(linebuf), FMT, filename, lineno, name);
err = PyFile_WriteString(linebuf, f);
if (xfp == NULL || err != 0)
return err;