summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/bufferobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
index da8d9fc..56748e6 100644
--- a/Objects/bufferobject.c
+++ b/Objects/bufferobject.c
@@ -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);