VirtualBox

Ignore:
Timestamp:
May 15, 2019 2:35:48 PM (6 years ago)
Author:
vboxsync
Message:

winnt/vboxsf: Fixed bug recently introduced in vbsfNtQueryFsVolumeInfo in the buffer-halfwas-too-small case. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.cpp

    r78487 r78533  
    679679            memcpy(pInfo->VolumeLabel, VBOX_VOLNAME_PREFIX, RT_MIN(cbLeft, VBOX_VOLNAME_PREFIX_SIZE));
    680680            if (cbLeft > VBOX_VOLNAME_PREFIX_SIZE)
    681                 memcpy(&pInfo->VolumeLabel[VBOX_VOLNAME_PREFIX_SIZE / sizeof(WCHAR)], pwcShareName, cbShareName);
     681            {
     682                cbLeft -= VBOX_VOLNAME_PREFIX_SIZE;
     683                memcpy(&pInfo->VolumeLabel[VBOX_VOLNAME_PREFIX_SIZE / sizeof(WCHAR)], pwcShareName, RT_MIN(cbLeft, cbShareName));
     684            }
    682685            Log(("VBOXSF: VBoxMRxQueryVolumeInfo: FileFsVolumeInformation: partial result (%#x, needed %#x)\n",
    683686                 cbCopied, cbCopied + cbVolLabel));
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