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:
Daniel Willmann 2013-06-12 23:57:42 +01:00
parent 79496745cf
commit 0e51bff61a
1 changed files with 1 additions and 0 deletions

View File

@ -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");