Kaydet (Commit) fd78a6f7 authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Patches #925152, #1118602: Avoid reading after the end of the buffer

in pyexpat.GetInputContext. Will backport to 2.4.
üst a2a9888f
......@@ -44,6 +44,9 @@ Core and builtins
Extension Modules
-----------------
- Patches #925152, #1118602: Avoid reading after the end of the buffer
in pyexpat.GetInputContext.
- Patches #749830, #1144555: allow UNIX mmap size to default to current
file size.
......
......@@ -1082,7 +1082,7 @@ xmlparse_GetInputContext(xmlparseobject *self, PyObject *args)
= XML_GetInputContext(self->itself, &offset, &size);
if (buffer != NULL)
result = PyString_FromStringAndSize(buffer + offset, size);
result = PyString_FromStringAndSize(buffer + offset, size - offset);
else {
result = Py_None;
Py_INCREF(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment