VirtualBox

Changeset 35900 in vbox for trunk


Ignore:
Timestamp:
Feb 8, 2011 4:07:43 PM (14 years ago)
Author:
vboxsync
Message:

Main/HostOnly: FreeBSD ioctl fix (#4213)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetAdp/freebsd/VBoxNetAdp-freebsd.c

    r35898 r35900  
    157157    {
    158158        case VBOXNETADP_CTL_ADD:
    159             if (   !(iCmd & IOC_OUT)   /* paranoia*/
     159            if (   !(iCmd & IOC_INOUT)   /* paranoia*/
    160160                || IOCPARM_LEN(iCmd) < sizeof(*pReq))
    161161                return EINVAL;
    162162
    163             rc = vboxNetAdpCreate(&pAdp, NULL);
     163            rc = vboxNetAdpCreate(&pAdp,
     164                                  pReq->szName[0] && RTStrEnd(pReq->szName, RT_MIN(cbReq, sizeof(pReq->szName))) ?
     165                                  pReq->szName : NULL);
    164166            if (RT_FAILURE(rc))
    165167                return EINVAL;
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