VirtualBox

Ignore:
Timestamp:
Feb 24, 2014 11:35:48 PM (11 years ago)
Author:
vboxsync
Message:

VBoxServiceVMInfo.cpp: 2nd attempt at socket address length fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp

    r50566 r50567  
    11651165    {
    11661166        /* Figure the size of the current request. */
    1167         size_t const cbCur = RT_OFFSETOF(struct ifreq, ifr_addr)
    1168 # ifdef SA_LEN
    1169                            + RT_MAX(sizeof(struct sockaddr), SA_LEN(pCur->ifr_addr));
     1167        size_t cbCur = RT_OFFSETOF(struct ifreq, ifr_addr);
     1168# if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) /* No sa_len on this platforms. */
     1169        Assert(pCur->ifr_addr.sa_family == AF_INET);
     1170        cbCur += sizeof(struct sockaddr);
    11701171# else
    1171                            + RT_MAX(sizeof(struct sockaddr), pCur->ifr_addr.sa_len);
     1172        cbCur += RT_MAX(sizeof(struct sockaddr), pCur->ifr_addr.sa_len);
    11721173# endif
    11731174        AssertBreak(cbCur <= cbLeft);
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