diff options
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c index 168a682..ecb0278 100644 --- a/src/common.c +++ b/src/common.c @@ -256,6 +256,10 @@ buffer_add (buffer_t * buf, const void *data, unsigned long size) } index = buf->ptr - buf->data; buf->data = realloc (buf->data, newsize); + if ( buf->data == NULL ) + { + die_with_message ( NULL, NULL, 'Memory allocation error'); + } buf->limit = buf->data + newsize; buf->ptr = buf->data + index; } |