From c16f0644beab693f77a589053e1a92b4e0f7adb2 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 2 May 2015 18:43:34 +0200 Subject: [PATCH] winedevice: Do not omit mandatory argument for VirtualProtect. --- programs/winedevice/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c index 9677a820923..ef1e1ef31c3 100644 --- a/programs/winedevice/device.c +++ b/programs/winedevice/device.c @@ -98,14 +98,14 @@ static HMODULE load_driver_module( const WCHAR *name ) VirtualProtect( page, info.PageSize, PAGE_EXECUTE_READWRITE, &old ); rel = LdrProcessRelocationBlock( page, (rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT), (USHORT *)(rel + 1), delta ); - if (old != PAGE_EXECUTE_READWRITE) VirtualProtect( page, info.PageSize, old, NULL ); + if (old != PAGE_EXECUTE_READWRITE) VirtualProtect( page, info.PageSize, old, &old ); if (!rel) goto error; } /* make sure we don't try again */ size = FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + nt->FileHeader.SizeOfOptionalHeader; VirtualProtect( nt, size, PAGE_READWRITE, &old ); nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = 0; - VirtualProtect( nt, size, old, NULL ); + VirtualProtect( nt, size, old, &old ); } }