VirtualBox

Changeset 3388 in kBuild for trunk/src


Ignore:
Timestamp:
Jun 26, 2020 4:52:06 PM (5 years ago)
Author:
bird
Message:

ntunlink.c: Make sure BasicInfo.FileAttributes isn't zero, or the NtSetInformationFile will be a noop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/nt/ntunlink.c

    r3386 r3388  
    6161        Ios.Information = -1;
    6262        Ios.u.Status    = -1;
     63        memset(&BasicInfo, 0, sizeof(BasicInfo));
    6364        rcNt = g_pfnNtQueryInformationFile(hFile, &Ios, &BasicInfo, sizeof(BasicInfo), MyFileBasicInformation);
    6465
    65         if (MY_NT_SUCCESS(rcNt) && MY_NT_SUCCESS(Ios.u.Status))
     66        if (MY_NT_SUCCESS(rcNt) && MY_NT_SUCCESS(Ios.u.Status) /*&& BasicInfo.FileAttributes != FILE_ATTRIBUTE_READONLY*/)
    6667            dwAttr = BasicInfo.FileAttributes & ~FILE_ATTRIBUTE_READONLY;
    6768        else
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