Browse Source

win-capture: Use MEM_RESERVE to comply with VirtualAllocEx spec

Richard Stanway 10 years ago
parent
commit
3474c61085
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/win-capture/inject-library.c

+ 1 - 1
plugins/win-capture/inject-library.c

@@ -50,7 +50,7 @@ int inject_library_obf(HANDLE process, const wchar_t *dll,
 	/* -------------------------------- */
 	/* -------------------------------- */
 
 
 	size = (wcslen(dll) + 1) * sizeof(wchar_t);
 	size = (wcslen(dll) + 1) * sizeof(wchar_t);
-	mem = virtual_alloc_ex(process, NULL, size, MEM_COMMIT, PAGE_READWRITE);
+	mem = virtual_alloc_ex(process, NULL, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
 	if (!mem) {
 	if (!mem) {
 		goto fail;
 		goto fail;
 	}
 	}