VirtualBox

Changeset 77818 in vbox for trunk/src


Ignore:
Timestamp:
Mar 21, 2019 1:17:25 AM (6 years ago)
Author:
vboxsync
Message:

SupHardNt: Made RTNtPathExpand8dot3Path() work correctly in kernel context (needs IPRT_NT_MAP_TO_ZW) and expand 8.3 names when comparing the executable image we found in the memory map with what NT returns for the process. [doxyfix]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/nt/RTNtPathExpand8dot3PathA.cpp

    r77816 r77818  
    5656 *                      This is all zeros and NULL on failure.
    5757 */
    58 RTDECL(int) RTNtPathExpand8dot3PathA(PCUNICODE_STRING pShort, bool fPathOnly, PUNICODE_STRING pUniStrDst)
     58RTDECL(int) RTNtPathExpand8dot3PathA(PCUNICODE_STRING pUniStrSrc, bool fPathOnly, PUNICODE_STRING pUniStrDst)
    5959{
    6060    /* Guess a reasonable size for the final version. */
    61     size_t const cbShort = pShort->Length;
     61    size_t const cbShort = pUniStrSrc->Length;
    6262    size_t       cbLong  = RT_MIN(_64K - 1, cbShort * 8);
    6363    if (cbLong < RTPATH_MAX)
     
    7171        pUniStrDst->MaximumLength = (uint16_t)cbLong;
    7272        pUniStrDst->Length        = (uint16_t)cbShort;
    73         memcpy(pUniStrDst->Buffer, pShort->Buffer, cbShort);
     73        memcpy(pUniStrDst->Buffer, pUniStrSrc->Buffer, cbShort);
    7474        pUniStrDst->Buffer[cbShort / sizeof(WCHAR)] = '\0';
    7575        int rc = RTNtPathExpand8dot3Path(pUniStrDst, fPathOnly);
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