summaryrefslogtreecommitdiffstats
path: root/Python/dynload_next.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-10 12:46:51 (GMT)
committerGuido van Rossum <guido@python.org>2000-04-10 12:46:51 (GMT)
commit5db862dd0cae0077b09a765220bb358e0e129449 (patch)
tree997e545b6dab223b7828d96ac9c39f26e5fe4d14 /Python/dynload_next.c
parentfa972c987c394507ca6fb76de5ef0b47e9301226 (diff)
downloadcpython-5db862dd0cae0077b09a765220bb358e0e129449.zip
cpython-5db862dd0cae0077b09a765220bb358e0e129449.tar.gz
cpython-5db862dd0cae0077b09a765220bb358e0e129449.tar.bz2
Skip Montanaro: add string precisions to calls to PyErr_Format
to prevent possible buffer overruns.
Diffstat (limited to 'Python/dynload_next.c')
-rw-r--r--Python/dynload_next.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/dynload_next.c b/Python/dynload_next.c
index 5088b05..08a6d7c 100644
--- a/Python/dynload_next.c
+++ b/Python/dynload_next.c
@@ -185,7 +185,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
if (!NSIsSymbolNameDefined(funcname)) {
/* UnlinkModule() isn't implimented in current versions, but calling it does no harm */
NSUnLinkModule(newModule, FALSE);
- PyErr_Format(PyExc_ImportError, "Loaded module does not contain symbol %s", funcname);
+ PyErr_Format(PyExc_ImportError,
+ "Loaded module does not contain symbol %.200s",
+ funcname);
return NULL;
}
theSym = NSLookupAndBindSymbol(funcname);