Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42e8e5d

Browse files
committed
Protect PyErr_Format format string argument from overflow.
1 parent 0d6b49e commit 42e8e5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/importdl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ _PyImport_LoadDynamicModule(name, pathname, fp)
577577
#endif
578578
if (p == NULL) {
579579
PyErr_Format(PyExc_ImportError,
580-
"dynamic module does not define init function (%s)",
580+
"dynamic module does not define init function (%.200s)",
581581
funcname);
582582
return NULL;
583583
}

0 commit comments

Comments
 (0)