Commit ffbd337aefae76a646bafd6e5f3c1edc18400f05

Linquize 2013-09-17T22:57:06

Fix failure in win32_find_git_in_registry() The buffer size 0 was definitely not enough so it failed

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/win32/findfile.c b/src/win32/findfile.c
index a1c11fc..eb83178 100644
--- a/src/win32/findfile.c
+++ b/src/win32/findfile.c
@@ -130,7 +130,7 @@ static int win32_find_git_in_registry(
 
 	assert(buf);
 
-	path16.len = 0;
+	path16.len = MAX_PATH;
 
 	if (RegOpenKeyExW(hieve, key, 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {
 		if (RegQueryValueExW(hKey, L"InstallLocation", NULL, &dwType,