summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-08-24 19:43:22 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-08-24 19:43:22 +0200
commitcbaf2c929a1c97cf9fb9c5a058f72c76a60edc52 (patch)
tree233ba0d5d8cec1d58118b1f38622840f34c962a4 /common
parentb418946fc6497c90c6b9ac387d1eed1a602d25bc (diff)
downloadeurephia-cbaf2c929a1c97cf9fb9c5a058f72c76a60edc52.tar.gz
eurephia-cbaf2c929a1c97cf9fb9c5a058f72c76a60edc52.tar.xz
eurephia-cbaf2c929a1c97cf9fb9c5a058f72c76a60edc52.zip
Fixed a SEGV issue when adding values to a value chain
eAdd_valuestruct() did not use a nullsafe strdup(). Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'common')
-rw-r--r--common/eurephia_values.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/eurephia_values.c b/common/eurephia_values.c
index 73205e2..d9f64eb 100644
--- a/common/eurephia_values.c
+++ b/common/eurephia_values.c
@@ -156,8 +156,8 @@ void eAdd_valuestruct(eurephiaCTX *ctx, eurephiaVALUES *vls, eurephiaVALUES *new
if( (vls->key == NULL) && (vls->val == NULL) && (vls->next == NULL) && (vls->evid == 0)) {
// Update header record if it is empty, by copying newval record. Free newval afterwards
- vls->key = strdup(newval->key);
- vls->val = strdup(newval->val);
+ vls->key = strdup_nullsafe(newval->key);
+ vls->val = strdup_nullsafe(newval->val);
vls->evid = 0;
vls->next = NULL;
do_free_vals(newval);