forked from pool/gsoap
Jan Engelhardt
8ace1c856c
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gsoap?expand=0&rev=46
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
References: https://sf.net/p/gsoap2/patches/124/
|
|
|
|
---
|
|
gsoap/plugin/wsaapi.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
Index: gsoap-2.8.22/gsoap/plugin/wsaapi.c
|
|
===================================================================
|
|
--- gsoap-2.8.22.orig/gsoap/plugin/wsaapi.c
|
|
+++ gsoap-2.8.22/gsoap/plugin/wsaapi.c
|
|
@@ -599,7 +599,7 @@ soap_wsa_rand_uuid(struct soap *soap)
|
|
k += 0x7FFFFFFF;
|
|
r2 = k;
|
|
k &= 0x8FFFFFFF;
|
|
- r2 += *(int*)soap->buf;
|
|
+ r2 += soap->buf[0] << 24 + soap->buf[1] << 16 + soap->buf[2] << 8 + soap->buf[3];
|
|
#endif
|
|
r3 = soap_random;
|
|
r4 = soap_random;
|
|
diff -ur gsoap-2.8.orig/gsoap/stdsoap2.cpp gsoap-2.8/gsoap/stdsoap2.cpp
|
|
--- gsoap-2.8.orig/gsoap/stdsoap2.cpp 2015-04-14 08:46:36.000000000 +0200
|
|
+++ gsoap-2.8/gsoap/stdsoap2.cpp 2015-05-05 09:01:31.633153838 +0200
|
|
@@ -3105,11 +3105,11 @@
|
|
int
|
|
SOAP_FMAC2
|
|
soap_rand()
|
|
-{ unsigned char buf[4];
|
|
+{ int buf;
|
|
if (!soap_ssl_init_done)
|
|
soap_ssl_init();
|
|
- RAND_pseudo_bytes(buf, 4);
|
|
- return *(int*)buf;
|
|
+ RAND_pseudo_bytes((unsigned char*)&buf, sizeof(int));
|
|
+ return buf;
|
|
}
|
|
#endif
|
|
#endif
|