Commit 7c460740 authored by Neal Norwitz's avatar Neal Norwitz

Check return result for error

parent 51abbc7b
...@@ -356,6 +356,8 @@ buffer_concat(PyBufferObject *self, PyObject *other) ...@@ -356,6 +356,8 @@ buffer_concat(PyBufferObject *self, PyObject *other)
return NULL; return NULL;
ob = PyString_FromStringAndSize(NULL, size + count); ob = PyString_FromStringAndSize(NULL, size + count);
if ( ob == NULL )
return NULL;
p = PyString_AS_STRING(ob); p = PyString_AS_STRING(ob);
memcpy(p, ptr1, size); memcpy(p, ptr1, size);
memcpy(p + size, ptr2, count); memcpy(p + size, ptr2, count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment