changeset: 88966:145032f626d3 parent: 88964:92fc6850dea0 parent: 88965:d83ce3a2d954 user: Christian Heimes date: Wed Feb 05 00:29:48 2014 +0100 files: Misc/NEWS Modules/_tkinter.c description: Issue #20515: Fix NULL pointer dereference introduced by issue #20368 CID 1167595 diff -r 92fc6850dea0 -r 145032f626d3 Misc/NEWS --- a/Misc/NEWS Tue Feb 04 14:27:14 2014 -0800 +++ b/Misc/NEWS Wed Feb 05 00:29:48 2014 +0100 @@ -24,6 +24,8 @@ Library ------- +- Issue #20515: Fix NULL pointer dereference introduced by issue #20368. + - Issue #19186: Restore namespacing of expat symbols inside the pyexpat module. - Issue #20053: ensurepip (and hence venv) are no longer affected by the diff -r 92fc6850dea0 -r 145032f626d3 Modules/_tkinter.c --- a/Modules/_tkinter.c Tue Feb 04 14:27:14 2014 -0800 +++ b/Modules/_tkinter.c Wed Feb 05 00:29:48 2014 +0100 @@ -1397,6 +1397,9 @@ if (PyUnicode_Check(in)) { Py_ssize_t size; s = PyUnicode_AsUTF8AndSize(in, &size); + if (s == NULL) { + return 0; + } if (size> INT_MAX) { PyErr_SetString(PyExc_OverflowError, "string is too long"); return 0;

AltStyle によって変換されたページ (->オリジナル) /