https://bugs.winehq.org/show_bug.cgi?id=46635
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com Component|-unknown |wineserver
--- Comment #6 from Zebediah Figura z.figura12@gmail.com ---
From the source, it's passing standard handles to NtQueryObject(). If the
handle is not redirected, it'll be a kernel32 console handle. That's not a kernel object, and on Windows it causes NtQueryObject() to spit up STATUS_INVALID_HANDLE. That means that "detect_msys_tty()" will return early and not crash.
I'm not quite sure what level this should be fixed on. To be fully correct, I'd say that get_handle_obj() in server/handle.c should fail for console input objects, as I suspect basically anything else that checks for it should return STATUS_INVALID_HANDLE rather than succeeding or returning STATUS_OBJECT_TYPE_MISMATCH. But that's certainly risky; it would need a lot of tests.