Browse Source

win-capture: Don't mark string mem. as executable

This is writing a string which LoadLibraryW can read in the target
process; it's not being executed so there's no reason to mark it as
executable.
jp9000 10 years ago
parent
commit
45ed0a39a8
1 changed files with 1 additions and 2 deletions
  1. 1 2
      plugins/win-capture/inject-library.c

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

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