]> granicus.if.org Git - python/commitdiff
Correct check of PyUnicode_Resize() return value.
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 16 Sep 2003 03:17:16 +0000 (03:17 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 16 Sep 2003 03:17:16 +0000 (03:17 +0000)
Python/bltinmodule.c

index c3beda9c0cef9a5bb6ce37db3b8b03d2c762f0b1..5e74929e4ad9e81b2b9f3a5730fefc28701351d2 100644 (file)
@@ -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;
                                        }