From: Antoine Pitrou Date: Tue, 4 Oct 2011 17:10:51 +0000 (+0200) Subject: Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9) X-Git-Tag: v3.3.0a1~1328^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2242522fde7b43e59be14abe828d3213a7b7aaaa;p=thirdparty%2FPython%2Fcpython.git Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9) --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 886d0249c7f6..594623c0bc55 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -10201,6 +10201,9 @@ unicode_expandtabs(PyUnicodeObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize)) return NULL; + if (PyUnicode_READY(self) == -1) + return NULL; + /* First pass: determine size of output string */ src_len = PyUnicode_GET_LENGTH(self); i = j = line_pos = 0;