diff options
author | Nathan Angelacos <nangel@alpinelinux.org> | 2014-06-07 18:28:55 +0000 |
---|---|---|
committer | Nathan Angelacos <nangel@alpinelinux.org> | 2014-06-07 18:28:55 +0000 |
commit | a34ea4fe74eed37c3550cb0ead159c85beba7090 (patch) | |
tree | c59aa617f8cd48a001a3ab9b9630000947a903d2 /src/common.c | |
parent | 403ad382e15ddc1d434c69e6d41992c824c22e09 (diff) | |
download | haserl-a34ea4fe74eed37c3550cb0ead159c85beba7090.tar.bz2 haserl-a34ea4fe74eed37c3550cb0ead159c85beba7090.tar.xz |
Fix vulnerabilites based on email:
[ISE-TPS-2014-008] Heap Overflow Vulnerability in Haserl 0.9.32
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; } |