diff options
author | Barry Warsaw <barry@python.org> | 2001-11-28 20:56:44 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-11-28 20:56:44 (GMT) |
commit | 312af42b47ad32ad8935b5706a890865a4f34d40 (patch) | |
tree | 2bbe0297dd23bd460665ffb21f86bc1c54a784be /Objects | |
parent | 6197509f2487a07af8ebfda75ac500aaa42df780 (diff) | |
download | cpython-312af42b47ad32ad8935b5706a890865a4f34d40.zip cpython-312af42b47ad32ad8935b5706a890865a4f34d40.tar.gz cpython-312af42b47ad32ad8935b5706a890865a4f34d40.tar.bz2 |
structseq_new(): Conversion of sprintf() to PyOS_snprintf() for buffer
overrun avoidance.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/structseq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/structseq.c b/Objects/structseq.c index 7ad607b..2ab9b52 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -102,7 +102,8 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds) len = PySequence_Length(arg); required_len = REAL_SIZE_TP(type); if (len != required_len) { - sprintf(msgbuf, + PyOS_snprintf( + msgbuf, sizeof(msgbuf), "constructor takes exactly %d arguments (%d given)", required_len, len); |