Protect PyErr_Format format string argument from overflow.

This commit is contained in:
Guido van Rossum 1998-01-19 22:23:08 +00:00
parent 0d6b49eff2
commit 42e8e5d164

View file

@ -577,7 +577,7 @@ _PyImport_LoadDynamicModule(name, pathname, fp)
#endif #endif
if (p == NULL) { if (p == NULL) {
PyErr_Format(PyExc_ImportError, PyErr_Format(PyExc_ImportError,
"dynamic module does not define init function (%s)", "dynamic module does not define init function (%.200s)",
funcname); funcname);
return NULL; return NULL;
} }