Sebastian Lackner : winedevice: Do not omit mandatory argument for VirtualProtect.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 4 07:58:53 CDT 2015
Module: wine
Branch: master
Commit: c16f0644beab693f77a589053e1a92b4e0f7adb2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c16f0644beab693f77a589053e1a92b4e0f7adb2
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Sat May 2 18:43:34 2015 +0200
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 9677a82..ef1e1ef 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 );
}
}
More information about the wine-cvs
mailing list