commit | b67170114949f13c1eacf6d58a06482bb7b78dd0 | [log] [tgz] |
---|---|---|
author | Eli Bendersky <eliben@gmail.com> | Sun Aug 04 06:09:49 2013 -0700 |
committer | Eli Bendersky <eliben@gmail.com> | Sun Aug 04 06:09:49 2013 -0700 |
tree | 8c81c6d831745a521a9a86126876b7736c96938b | |
parent | 06fbac5ea0aaa30020b87b7abe6a094d65bdcd89 [diff] [blame] |
Issue #13612: Fix a buffer overflow in case of a multi-byte encoding. This is a belated backport of f7b47fb30169; Patch by Serhiy Storchaka.
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 379aa01..b9abcac 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c
@@ -2427,6 +2427,8 @@ if (PyUnicode_GET_SIZE(u) != 256) { Py_DECREF(u); + PyErr_SetString(PyExc_ValueError, + "multi-byte encodings are not supported"); return XML_STATUS_ERROR; }