fix plugins/plugin_common.c:97:5: warning: dereferencing type-punned pointer will break strict-aliasing rules

This commit is contained in:
Petr Lautrbach 2013-09-03 14:42:32 +02:00
parent dece5e9765
commit 269f08fcc8

View File

@ -34,9 +34,21 @@ diff -up cyrus-sasl-2.1.26/plugins/ldapdb.c.warnings cyrus-sasl-2.1.26/plugins/l
#include <ldap.h> #include <ldap.h>
static char ldapdb[] = "ldapdb"; static char ldapdb[] = "ldapdb";
diff -up cyrus-sasl-2.1.26/plugins/plugin_common.c.warnings cyrus-sasl-2.1.26/plugins/plugin_common.c
--- cyrus-sasl-2.1.26/plugins/plugin_common.c.warnings 2013-09-03 14:40:35.181455452 +0200
+++ cyrus-sasl-2.1.26/plugins/plugin_common.c 2013-09-03 14:40:38.320441024 +0200
@@ -94,7 +94,7 @@ static void sockaddr_unmapped(
if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
return;
sin4 = (struct sockaddr_in *)sa;
- addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
+ addr = *(uint32_t *)&sin6->sin6_addr.s6_addr32[3];
port = sin6->sin6_port;
memset(sin4, 0, sizeof(struct sockaddr_in));
sin4->sin_addr.s_addr = addr;
diff -up cyrus-sasl-2.1.26/saslauthd/auth_httpform.c.warnings cyrus-sasl-2.1.26/saslauthd/auth_httpform.c diff -up cyrus-sasl-2.1.26/saslauthd/auth_httpform.c.warnings cyrus-sasl-2.1.26/saslauthd/auth_httpform.c
--- cyrus-sasl-2.1.26/saslauthd/auth_httpform.c.warnings 2012-10-12 16:05:48.000000000 +0200 --- cyrus-sasl-2.1.26/saslauthd/auth_httpform.c.warnings 2012-10-12 16:05:48.000000000 +0200
+++ cyrus-sasl-2.1.26/saslauthd/auth_httpform.c 2012-12-20 17:50:13.247110021 +0100 +++ cyrus-sasl-2.1.26/saslauthd/auth_httpform.c 2013-09-03 14:39:25.411776109 +0200
@@ -574,7 +574,7 @@ auth_httpform ( @@ -574,7 +574,7 @@ auth_httpform (
"Content-Type: application/x-www-form-urlencoded" CRLF "Content-Type: application/x-www-form-urlencoded" CRLF
"Content-Length: %d" TWO_CRLF "Content-Length: %d" TWO_CRLF