VirtualBox

Ignore:
Timestamp:
Dec 11, 2023 9:36:43 AM (14 months ago)
Author:
vboxsync
Message:

Dev/DevQemuFwCfg: Fixed size calculation of the config file name in qemuFwCfgR3ReadFileDir().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevQemuFwCfg.cpp

    r102544 r102565  
    722722        pThis->u.CfgFile.uCfgItem = RT_H2BE_U16(pEntry->Cfg.uCfgItem);
    723723        pThis->u.CfgFile.u16Rsvd  = 0;
    724         strncpy(pThis->u.CfgFile.szFilename, pEntry->Cfg.pszItem, sizeof(pThis->u.CfgFile.szFilename));
     724        strncpy(pThis->u.CfgFile.szFilename, pEntry->Cfg.pszItem, sizeof(pThis->u.CfgFile.szFilename) - 1);
    725725        pThis->u.CfgFile.szFilename[QEMU_FW_CFG_ITEM_FILE_NAME_MAX] = '\0';
    726726
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