Bug 1592371 - QueryDosDeviceWHook returns size of lpTargetPath copy on success. r=bobowen

Prior to the patch we appear to be returning the size of lpDeviceName rather
than lpTargetPath.

Differential Revision: https://phabricator.services.mozilla.com/D50979

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bryce Seager van Dyk 2019-10-29 19:31:19 +00:00
parent cfdc1ac4fe
commit 398e5555d9

View File

@ -186,7 +186,7 @@ DWORD WINAPI QueryDosDeviceWHook(LPCWSTR lpDeviceName, LPWSTR lpTargetPath,
PodCopy(lpTargetPath, device.c_str(), device.size());
lpTargetPath[device.size()] = 0;
GMP_LOG_DEBUG("QueryDosDeviceWHook %S -> %S", lpDeviceName, lpTargetPath);
return name.size();
return device.size();
}
static std::vector<std::wstring> GetDosDeviceNames() {