Mercurial > cpython-lru_cache-weakref
diff Python/dynload_next.c @ 12320:5de0b939fe61 legacy-trunk
Skip Montanaro: add string precisions to calls to PyErr_Format
to prevent possible buffer overruns.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 10 Apr 2000 12:46:51 +0000 |
| parents | 528559a0b2f2 |
| children | 916fb024ce94 |
line wrap: on
line diff
--- a/Python/dynload_next.c Mon Apr 10 12:45:45 2000 +0000 +++ b/Python/dynload_next.c Mon Apr 10 12:46:51 2000 +0000 @@ -185,7 +185,9 @@ 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);
