summaryrefslogtreecommitdiff
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-09-16 03:17:16 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2003-09-16 03:17:16 +0000
commit364f6becadd79698f8cb2593be7510cd7fe938a6 (patch)
tree9db719f88581402bef6f53e92af6f7a402b571c0 /Python/bltinmodule.c
parent1aad9c7dade411992005343f6b5b825ac9369ebc (diff)
downloadcpython-git-364f6becadd79698f8cb2593be7510cd7fe938a6.tar.gz
Correct check of PyUnicode_Resize() return value.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index c3beda9c0c..5e74929e4a 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;
}