rpcrt4: Cast to ULONGLONG instead of LONGLONG in test_simple_struct test_simple_struct to avoid shift overflow.

Gerald Pfeifer gerald at pfeifer.com
Thu Sep 3 17:39:24 CDT 2015


The code actually uses ULONGLONG in several other places in this
file, using just LONGLONG here seems like a simple omission.

Gerald
---
 dlls/rpcrt4/tests/ndr_marshall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index 83ea6b9..22daab6 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -967,7 +967,7 @@ static void test_simple_struct(void)
     s1.c = 0xa5;
     s1.l1 = 0xdeadbeef;
     s1.l2 = 0xcafebabe;
-    s1.ll = ((LONGLONG) 0xbadefeed << 32) | 0x2468ace0;
+    s1.ll = ((ULONGLONG) 0xbadefeed << 32) | 0x2468ace0;
 
     wiredatalen = 24;
     memcpy(wiredata, &s1, wiredatalen); 
-- 
2.4.6



More information about the wine-patches mailing list