Gerald Pfeifer : rpcrt4/tests: Cast to ULONGLONG instead of LONGLONG to avoid shift overflow.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Sep 4 07:03:43 CDT 2015


Module: wine
Branch: master
Commit: e6ca322fb15e09e9a4fcc37db86d21f4257e2fff
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e6ca322fb15e09e9a4fcc37db86d21f4257e2fff

Author: Gerald Pfeifer <gerald at pfeifer.com>
Date:   Fri Sep  4 00:39:24 2015 +0200

rpcrt4/tests: Cast to ULONGLONG instead of LONGLONG to avoid shift overflow.

---

 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 d6befe5..aeecf8c 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -965,7 +965,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); 




More information about the wine-cvs mailing list