From 02ed41e61459d2b2922e4720287c8d8c71fb600d Mon Sep 17 00:00:00 2001 From: Zohar Malamant Date: Tue, 10 Dec 2019 14:53:49 +0100 Subject: [PATCH] Fix incorrect strlen in node_data_alloc_string --- lib/util/node_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/node_data.cpp b/lib/util/node_data.cpp index 728cbf8566..f5d1170c5e 100644 --- a/lib/util/node_data.cpp +++ b/lib/util/node_data.cpp @@ -165,7 +165,7 @@ char * node_data_get_string(const node_data_type * node_data) { node_data_type * node_data_alloc_string(const char * value) { void * data_copy = util_alloc_string_copy( value ); - return node_data_alloc__( data_copy , CTYPE_VOID_POINTER , strlen(value + 1) , NULL , free); + return node_data_alloc__( data_copy , CTYPE_VOID_POINTER , strlen(value) + 1 , NULL , free); }