VirtualBox

Changeset 21996 in vbox


Ignore:
Timestamp:
Aug 5, 2009 1:07:00 PM (15 years ago)
Author:
vboxsync
Message:

icmp_error: don't crash when msrc is NULL (debug builds only).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/ip_icmp.c

    r21865 r21996  
    105105        pData->pfGetAdaptersAddresses = (ULONG (WINAPI *)(ULONG, ULONG, PVOID, PIP_ADAPTER_ADDRESSES, PULONG))
    106106                                    GetProcAddress(pData->hmIcmpLibrary, "GetAdaptersAddresses");
    107         if (pData->pfGetAdaptersAddresses == NULL) 
     107        if (pData->pfGetAdaptersAddresses == NULL)
    108108        {
    109109            LogRel(("NAT: Can't find GetAdapterAddresses in Iphlpapi.dll"));
     
    113113    if (pData->pfIcmpParseReplies == NULL)
    114114    {
    115         if(pData->pfGetAdaptersAddresses == NULL) 
     115        if(pData->pfGetAdaptersAddresses == NULL)
    116116            FreeLibrary(pData->hmIcmpLibrary);
    117117        pData->hmIcmpLibrary = LoadLibrary("Icmp.dll");
     
    251251    if (found == 1 && icm == NULL)
    252252    {
    253         if (so->so_state == SS_NOFDREF) 
     253        if (so->so_state == SS_NOFDREF)
    254254        {
    255255            /* socket is shutdowning we've already sent ICMP on it.*/
     
    490490    DEBUG_CALL("icmp_error");
    491491    DEBUG_ARG("msrc = %lx", (long )msrc);
    492     DEBUG_ARG("msrc_len = %d", msrc->m_len);
     492    DEBUG_ARG("msrc_len = %d", msrc ? msrc->m_len : 0);
    493493
    494494    if (type!=ICMP_UNREACH && type!=ICMP_TIMXCEED)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette