VirtualBox

Changeset 88543 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 15, 2021 1:02:17 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143821
Message:

NAT: slirp_ext_m_get - assertions are nice, but make sure we actually
fail in the release build too if the asserted condition is false.
bugref:9991.

File:
1 edited

Legend:

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

    r82968 r88543  
    500500    LogFlowFunc(("ENTER: cbMin:%d, ppvBuf:%p, pcbBuf:%p\n", cbMin, ppvBuf, pcbBuf));
    501501
     502    *ppvBuf = NULL;
     503    *pcbBuf = 0;
     504
    502505    if (cbMin < MCLBYTES)
    503506        size = MCLBYTES;
     
    507510        size = MJUM16BYTES;
    508511    else
    509         AssertMsgFailed(("Unsupported size"));
     512    {
     513        AssertMsgFailed(("Unsupported size %zu", cbMin));
     514        LogFlowFunc(("LEAVE: NULL (bad size %zu)\n", cbMin));
     515        return NULL;
     516    }
    510517
    511518    m = m_getjcl(pData, M_NOWAIT, MT_HEADER, M_PKTHDR, size);
    512519    if (m == NULL)
    513520    {
    514         *ppvBuf = NULL;
    515         *pcbBuf = 0;
    516521        LogFlowFunc(("LEAVE: NULL\n"));
    517522        return NULL;
Note: See TracChangeset for help on using the changeset viewer.

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