Skip to content

Commit c64efee

Browse files
author
neal.norwitz
committed
Check return result for error
git-svn-id: http://svn.python.org/projects/python/trunk@41757 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent a70dea6 commit c64efee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Objects/bufferobject.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ buffer_concat(PyBufferObject *self, PyObject *other)
356356
return NULL;
357357

358358
ob = PyString_FromStringAndSize(NULL, size + count);
359+
if ( ob == NULL )
360+
return NULL;
359361
p = PyString_AS_STRING(ob);
360362
memcpy(p, ptr1, size);
361363
memcpy(p + size, ptr2, count);

0 commit comments

Comments
 (0)