forked from pool/gsoap
Jan Engelhardt
041d5dff91
- Add gsoap-allocator.diff to please UBSAN OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gsoap?expand=0&rev=43
87 lines
2.7 KiB
Diff
87 lines
2.7 KiB
Diff
References: https://sourceforge.net/p/gsoap2/patches/124/attachment/gsoap-aliasing.patch
|
|
|
|
diff -ur gsoap-2.8.orig/gsoap/plugin/wsaapi.c gsoap-2.8/gsoap/plugin/wsaapi.c
|
|
--- gsoap-2.8.orig/gsoap/plugin/wsaapi.c 2015-04-14 08:46:30.000000000 +0200
|
|
+++ gsoap-2.8/gsoap/plugin/wsaapi.c 2015-05-05 09:19:27.985619710 +0200
|
|
@@ -599,7 +599,7 @@
|
|
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/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp gsoap-2.8/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp
|
|
--- gsoap-2.8.orig/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp 2015-04-14 08:46:34.000000000 +0200
|
|
+++ gsoap-2.8/gsoap/samples/calc_vs2005/calc_vs2005/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
|
|
diff -ur gsoap-2.8.orig/gsoap/stdsoap2.c gsoap-2.8/gsoap/stdsoap2.c
|
|
--- gsoap-2.8.orig/gsoap/stdsoap2.c 2015-04-14 08:46:36.000000000 +0200
|
|
+++ gsoap-2.8/gsoap/stdsoap2.c 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
|
|
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
|
|
diff -ur gsoap-2.8.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp gsoap-2.8/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp
|
|
--- gsoap-2.8.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp 2015-04-14 08:46:36.000000000 +0200
|
|
+++ gsoap-2.8/gsoap/VisualStudio2005/wsdl2h/wsdl2h/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
|