mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Check return result for error
This commit is contained in:
parent
51abbc7b4a
commit
7c460740ed
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue