diff options
author | Daniel Willmann <daniel@totalueberwachung.de> | 2013-06-12 23:57:42 +0100 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2013-06-12 23:57:42 +0100 |
commit | 0e51bff61ac4678ab75384d704141f49c87f352b (patch) | |
tree | 378d578ccf2d02a394ee47a347c30caceebe7a27 | |
parent | 79496745cff6acdfc15aed2377d142b59917416c (diff) | |
download | efl-0e51bff61ac4678ab75384d704141f49c87f352b.tar.gz |
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.
-rw-r--r-- | src/tests/eina/eina_test_str.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tests/eina/eina_test_str.c b/src/tests/eina/eina_test_str.c index b4c3660b7b..1d95f21b1a 100644 --- a/src/tests/eina/eina_test_str.c +++ b/src/tests/eina/eina_test_str.c @@ -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"); |