[haiku-commits] r38193 - haiku/trunk/src/add-ons/kernel/network/protocols/ipv4

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 17 Aug 2010 17:34:24 +0200 (CEST)

Author: axeld
Date: 2010-08-17 17:34:24 +0200 (Tue, 17 Aug 2010)
New Revision: 38193
Changeset: http://dev.haiku-os.org/changeset/38193

Modified:
   haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp
Log:
* Fixed CID 1511: protocol could be NULL.


Modified: haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp      
2010-08-17 15:29:08 UTC (rev 38192)
+++ haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp      
2010-08-17 15:34:24 UTC (rev 38193)
@@ -1471,7 +1471,7 @@
        // handle IP_MULTICAST_IF
        if (IN_MULTICAST(ntohl(
                        ((sockaddr_in*)buffer->destination)->sin_addr.s_addr))
-               && protocol->multicast_address != NULL) {
+               && protocol != NULL && protocol->multicast_address != NULL) {
                net_interface_address* address = 
sDatalinkModule->get_interface_address(
                        protocol->multicast_address);
                if (address == NULL || (address->interface->flags & IFF_UP) == 
0) {


Other related posts:

  • » [haiku-commits] r38193 - haiku/trunk/src/add-ons/kernel/network/protocols/ipv4 - axeld