VirtualBox

Changeset 31556 in vbox


Ignore:
Timestamp:
Aug 11, 2010 8:14:34 AM (14 years ago)
Author:
vboxsync
Message:

strncpy

Location:
trunk/src/VBox/HostDrivers/VBoxNetAdp
Files:
2 edited

Legend:

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

    r30320 r31556  
    103103    int rc = 0;
    104104
    105     Log(("VBoxNetFltFreeBSDModuleEvent\n"));
     105    Log(("VBoxNetAdpFreeBSDModuleEvent\n"));
    106106
    107107    switch (enmEventType)
  • trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c

    r31555 r31556  
    184184            if (!err)
    185185            {
    186                 strncpy(pThis->szName, pNetDev->name, VBOXNETADP_MAX_NAME_LEN);
     186                strncpy(pThis->szName, pNetDev->name, sizeof(pThis->szName));
     187                pThis->szName[sizeof(pThis->szName) - 1] = '\0';
    187188                pThis->u.s.pNetDev = pNetDev;
    188189                Log2(("vboxNetAdpOsCreate: pThis=%p pThis->szName = %p\n", pThis, pThis->szName));
     
    383384{
    384385    int rc;
    385     Log(("VBoxNetFltLinuxUnload\n"));
     386    Log(("VBoxNetAdpLinuxUnload\n"));
    386387
    387388    /*
     
    399400    RTR0Term();
    400401
    401     Log(("VBoxNetFltLinuxUnload - done\n"));
    402 }
    403 
     402    Log(("VBoxNetAdpLinuxUnload - done\n"));
     403}
     404
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