From: Jeremy Hylton Date: Tue, 16 Sep 2003 03:17:16 +0000 (+0000) Subject: Correct check of PyUnicode_Resize() return value. X-Git-Tag: v2.4a1~1574 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=364f6becadd79698f8cb2593be7510cd7fe938a6;p=thirdparty%2FPython%2Fcpython.git Correct check of PyUnicode_Resize() return value. --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index c3beda9c0cef..5e74929e4ad9 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2381,7 +2381,8 @@ filterunicode(PyObject *func, PyObject *strobj) to avoid reallocations */ if (need < 2 * outlen) need = 2 * outlen; - if (PyUnicode_Resize(&result, need)) { + if (PyUnicode_Resize( + &result, need) < 0) { Py_DECREF(item); goto Fail_1; }