VirtualBox

Changeset 87846 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Feb 23, 2021 11:50:05 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142910
Message:

VBoxService/VMInfo: Fix a call to strncpy(3C) to specify the size of the destination buffer rather than the source buffer.

File:
1 edited

Legend:

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

    r83974 r87846  
    13271327            RT_ZERO(IfReq);
    13281328            AssertCompile(sizeof(IfReq.lifr_name) >= sizeof(pCur->ifr_name));
    1329             strncpy(IfReq.lifr_name, pCur->ifr_name, sizeof(pCur->ifr_name));
     1329            strncpy(IfReq.lifr_name, pCur->ifr_name, sizeof(IfReq.lifr_name));
    13301330            if (ioctl(sd, SIOCGLIFADDR, &IfReq) >= 0)
    13311331            {
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