Ecore file test: Fix access to uninitialized memory.
authorTom Hacohen <tom@stosb.com>
Wed, 20 May 2015 14:32:12 +0000 (15:32 +0100)
committerTom Hacohen <tom@stosb.com>
Wed, 20 May 2015 15:27:00 +0000 (16:27 +0100)
src/tests/ecore/ecore_test_ecore_file.c

index ce8c7a8..8838264 100644 (file)
@@ -378,6 +378,7 @@ START_TEST(ecore_test_ecore_file_path)
    src_dir = getenv("PATH");
    fail_if(!src_dir);
    path = malloc(strlen(src_dir) + strlen(dup_dir) + 1);
+   *path = '\0';
    strcat(path, src_dir);
    strcat(path, ":");
    strcat(path, dirname(dup_dir));