forked from enlightenment/efl
eina_test_str: Make sure we have an empty string before using strcat
Caused issues with address sanitizer. Just calling allocating memory for a string does not mean that it's empty/NULL-terminated.
This commit is contained in:
parent
79496745cf
commit
0e51bff61a
|
@ -166,6 +166,7 @@ START_TEST(str_split)
|
|||
free(result);
|
||||
|
||||
str = malloc(sizeof(char) * 1024);
|
||||
str[0] = 0;
|
||||
for (elements = 0; elements < 300; elements++)
|
||||
strcat(str, "ma:");
|
||||
strcat(str, "ma");
|
||||
|
|
Loading…
Reference in New Issue