I was able to install the DokanSetup.exe from the "msvc" subdir to launch hdimount on Windows.
However, for the same exact DMG file that Linux hdimount can mount correctly, the Windows hdimount is saying "Error: Not encrypted or wrong password."
I think I might've found the issue.
In the Windows version of getpass, the passLength is never updated, so it stays at 0 and keeps writing the console input to index 0.
Not only that, but it looks like it never NULL-terminates the string afterward (update: thus the password retains the RETURN at the end.)
|
while (passLength < sizeof(pass) && ReadConsoleA(hIn, &pass[passLength], 1, &dwRead, NULL) && pass[passLength] != RETURN ) |
[snipped]
I was able to install the DokanSetup.exe from the "msvc" subdir to launch hdimount on Windows.
However, for the same exact DMG file that Linux hdimount can mount correctly, the Windows hdimount is saying "Error: Not encrypted or wrong password."
I think I might've found the issue.
In the Windows version of
getpass, thepassLengthis never updated, so it stays at 0 and keeps writing the console input to index 0.Not only that, but it looks like it never NULL-terminates the string afterward (update: thus the password retains the
RETURNat the end.)hdimount/src/CrossPlatform.cpp
Line 37 in b1a31ae
[snipped]