Commit 4b4ab20f authored by Barry Warsaw's avatar Barry Warsaw

ste_repr(): Conversion of sprintf() to PyOS_snprintf() for buffer

overrun avoidance.
parent 857bf52d
...@@ -85,7 +85,8 @@ ste_repr(PySymtableEntryObject *ste) ...@@ -85,7 +85,8 @@ ste_repr(PySymtableEntryObject *ste)
{ {
char buf[256]; char buf[256];
sprintf(buf, "<symtable entry %.100s(%ld), line %d>", PyOS_snprintf(buf, sizeof(buf),
"<symtable entry %.100s(%ld), line %d>",
PyString_AS_STRING(ste->ste_name), PyString_AS_STRING(ste->ste_name),
PyInt_AS_LONG(ste->ste_id), PyInt_AS_LONG(ste->ste_id),
ste->ste_lineno); ste->ste_lineno);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment