Skip to content

Commit

Permalink
Fix incorrect strlen in node_data_alloc_string
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkwah committed Jan 10, 2020
1 parent 07a9e60 commit 02ed41e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/node_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit 02ed41e

Please sign in to comment.