Stefan Leichter : kernel32: Let K32EnumProcessModules fail if the last parameter is NULL.
Alexandre Julliard
julliard at winehq.org
Fri Jun 22 10:52:04 CDT 2012
Module: wine
Branch: master
Commit: c0e72bb3626a7ba8090ee07cc0aa88cd5c8b7f9e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0e72bb3626a7ba8090ee07cc0aa88cd5c8b7f9e
Author: Stefan Leichter <Stefan.Leichter at camline.com>
Date: Thu Jun 21 23:11:19 2012 +0200
kernel32: Let K32EnumProcessModules fail if the last parameter is NULL.
---
dlls/kernel32/module.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index adf8a99..9913f1b 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -1175,6 +1175,12 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
if (!init_module_iterator(&iter, process))
return FALSE;
+ if (!needed)
+ {
+ SetLastError(ERROR_NOACCESS);
+ return FALSE;
+ }
+
*needed = 0;
while ((ret = module_iterator_next(&iter)) > 0)
More information about the wine-cvs
mailing list