[PATCH] urlmon: Fixed an array overread (Coverity)

Marcus Meissner marcus at jet.franken.de
Mon Nov 14 05:31:11 CST 2011


Hi,

In the second case we could read over the end of the array. Nothing
bad would happen, just take care that we do not.

CID 1786

Ciao, Marcus
---
 dlls/urlmon/tests/sec_mgr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/urlmon/tests/sec_mgr.c b/dlls/urlmon/tests/sec_mgr.c
index 2f33f02..2509d84 100644
--- a/dlls/urlmon/tests/sec_mgr.c
+++ b/dlls/urlmon/tests/sec_mgr.c
@@ -423,8 +423,8 @@ static void test_SecurityManager(void)
     ok(size == sizeof(secid10) ||
        size == sizeof(secid10_2), /* win2k3 */
        "size=%d\n", size);
-    ok(!memcmp(buf, secid10, size) ||
-       !memcmp(buf, secid10_2, size), /* win2k3 */
+    ok(!memcmp(buf, secid10, sizeof(secid10)) ||
+       !memcmp(buf, secid10_2, sizeof(secid10_2)), /* win2k3 */
        "wrong secid\n");
 
     zone = 100;
-- 
1.7.3.4




More information about the wine-patches mailing list