]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix type-punned pointer in forwarding
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 12 Dec 2009 00:58:17 +0000 (13:58 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 12 Dec 2009 00:58:17 +0000 (13:58 +1300)
src/forward.cc

index 009bc193ab0fa66a9bc3641d387632055791f19b..b02c275e1b9673629c263c3fb838fa8983130f54 100644 (file)
@@ -1000,7 +1000,8 @@ FwdState::dispatch()
                         break;
 
                     if (o->cmsg_level == SOL_IP && o->cmsg_type == IP_TOS) {
-                        clientFde->upstreamTOS = (unsigned char)(*(int*)CMSG_DATA(o));
+                        int *tmp = (int*)CMSG_DATA(o);
+                        clientFde->upstreamTOS = (unsigned char)*tmp;
                         break;
                     }
                     pbuf += CMSG_LEN(o->cmsg_len);