summaryrefslogtreecommitdiffstats
path: root/Modules
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 /Modules
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 'Modules')
-rw-r--r--Modules/pyexpat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index db0ae85..e98f393 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -307,7 +307,7 @@ xmlparse_Parse( xmlparseobject *self, PyObject *args )
return NULL;
}
else if (rv == 0) {
- PyErr_Format(ErrorObject, "%s: line %i, column %i",
+ PyErr_Format(ErrorObject, "%.200s: line %i, column %i",
XML_ErrorString( XML_GetErrorCode(self->itself) ),
XML_GetErrorLineNumber(self->itself),
XML_GetErrorColumnNumber(self->itself) );