Skip to content
Snippets Groups Projects
Commit e85dbe60 authored by David Gobbi's avatar David Gobbi
Browse files

Guard against sprintf overflow in PyVTKObject_Repr.

parent 2e6243d4
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ PyObject *PyVTKObject_String(PyObject *op)
PyObject *PyVTKObject_Repr(PyObject *op)
{
char buf[255];
sprintf(buf,"(%s)%p", op->ob_type->tp_name, static_cast<void*>(op));
sprintf(buf, "(%.200s)%p", op->ob_type->tp_name, static_cast<void*>(op));
return PyString_FromString(buf);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment