VirtualBox

Changeset 72097 in vbox


Ignore:
Timestamp:
May 3, 2018 4:11:38 PM (6 years ago)
Author:
vboxsync
Message:

Guest Control/VBoxService: Added additional size check in vgsvcGstCtrlSessionHandleFileWrite().

File:
1 edited

Legend:

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

    r71781 r72097  
    390390    if (RT_SUCCESS(rc))
    391391    {
     392        /* Make sure that we only write up to cbScratchBuf bytes. */
     393        if (cbToWrite > (uint32_t)cbScratchBuf)
     394            cbToWrite = (uint32_t)cbScratchBuf;
     395
    392396        size_t cbWritten = 0;
    393397        PVBOXSERVICECTRLFILE pFile = vgsvcGstCtrlSessionFileGetLocked(pSession, uHandle);
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