VirtualBox

Ignore:
Timestamp:
Jul 2, 2018 11:42:23 PM (6 years ago)
Author:
vboxsync
Message:

VBoxPci-linux.c: avoid -Wstringop-truncation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c

    r72139 r72803  
    434434        }
    435435        /** @todo RTStrCopy not exported. */
    436         strncpy(pIns->szPrevDriver, currentDriver, sizeof(pIns->szPrevDriver));
     436        strncpy(pIns->szPrevDriver, currentDriver, sizeof(pIns->szPrevDriver) - 1);
     437        pIns->szPrevDriver[sizeof(pIns->szPrevDriver) - 1] = '\0';
    437438    }
    438439
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