mirror of https://github.com/python/cpython.git
structseq_new(): Conversion of sprintf() to PyOS_snprintf() for buffer
overrun avoidance.
This commit is contained in:
parent
6197509f24
commit
312af42b47
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue