VirtualBox

Changeset 72870 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Jul 4, 2018 12:00:25 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123415
Message:

VBoxNetAdp.c: avoid -Wstringop-truncation

File:
1 edited

Legend:

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

    r69500 r72870  
    120120                Log(("vboxNetAdpCreate: using name: %s\n", pcszName));
    121121                pThis->iUnit = vboxNetAdpGetUnitByName(pcszName);
    122                 strncpy(pThis->szName, pcszName, sizeof(pThis->szName));
     122                strncpy(pThis->szName, pcszName, sizeof(pThis->szName) - 1);
    123123                pThis->szName[sizeof(pThis->szName) - 1] = '\0';
    124124            }
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