Marcus Meissner : hnetcfg: GetModuleFileNameW gets characters, not bytes ( Coverity).

Alexandre Julliard julliard at winehq.org
Mon Jun 25 15:41:51 CDT 2018


Module: wine
Branch: master
Commit: 46c5eb173fa3435f0f8bfe7573a1c134be23c107
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=46c5eb173fa3435f0f8bfe7573a1c134be23c107

Author: Marcus Meissner <meissner at suse.de>
Date:   Mon Jun 25 15:28:33 2018 +0200

hnetcfg: GetModuleFileNameW gets characters, not bytes (Coverity).

Signed-off-by: Marcus Meissner <meissner at suse.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hnetcfg/tests/policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/hnetcfg/tests/policy.c b/dlls/hnetcfg/tests/policy.c
index f2d1372..b28535d 100644
--- a/dlls/hnetcfg/tests/policy.c
+++ b/dlls/hnetcfg/tests/policy.c
@@ -117,7 +117,7 @@ static void test_NetFwAuthorizedApplication(void)
             &IID_INetFwAuthorizedApplication, (void**)&app);
     ok(hr == S_OK, "got: %08x\n", hr);
 
-    hr = GetModuleFileNameW(NULL, image, sizeof(image));
+    hr = GetModuleFileNameW(NULL, image, ARRAY_SIZE(image));
     ok(hr, "GetModuleFileName failed: %u\n", GetLastError());
 
     hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, NULL);




More information about the wine-cvs mailing list