Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 952cf71

Browse files
authored
Merge pull request libgit2#4537 from pks-t/pks/tests-filemode-uninitialized-memory
tests: index::filemodes: fix use of uninitialized memory
2 parents f1ad004 + cabe16d commit 952cf71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/index/filemodes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ void test_index_filemodes__frombuffer_requires_files(void)
264264
const git_index_entry *ret_entry;
265265
const char *content = "hey there\n";
266266

267+
memset(&new_entry, 0, sizeof(new_entry));
267268
cl_git_pass(git_repository_index(&index, g_repo));
268269

269270
/* regular blob */

0 commit comments

Comments
 (0)