Check return result for error
This commit is contained in:
parent
51abbc7b4a
commit
7c460740ed
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue