]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Check return result for error
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 18 Dec 2005 08:02:38 +0000 (08:02 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 18 Dec 2005 08:02:38 +0000 (08:02 +0000)
Objects/bufferobject.c

index da8d9fc6a25767eb5962e0d48948fc93c16597d6..56748e671e68c0236d076b58536e69847fc526af 100644 (file)
@@ -356,6 +356,8 @@ buffer_concat(PyBufferObject *self, PyObject *other)
                return NULL;
 
        ob = PyString_FromStringAndSize(NULL, size + count);
+       if ( ob == NULL )
+               return NULL;
        p = PyString_AS_STRING(ob);
        memcpy(p, ptr1, size);
        memcpy(p + size, ptr2, count);