* dtable.cc (handle_to_fn): Detect failing NtQueryObject.

This commit is contained in:
Christopher Faylor 2009-07-06 15:11:30 +00:00
parent e4001d4ccd
commit 1183d7fb13
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2009-07-06 Christopher Faylor <me+cygwin@cgf.cx>
* dtable.cc (handle_to_fn): Detect failing NtQueryObject.
2009-07-06 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc: Delete stray CR.

View File

@ -891,8 +891,9 @@ handle_to_fn (HANDLE h, char *posix_fn)
WCHAR *maxmatchdos = NULL;
int maxmatchlen = 0;
NtQueryObject (h, ObjectNameInformation, &dummy_oni, sizeof (dummy_oni), &len);
if (!len)
NTSTATUS status = NtQueryObject (h, ObjectNameInformation, &dummy_oni,
sizeof (dummy_oni), &len);
if (!NT_SUCCESS (status) || !len)
debug_printf ("NtQueryObject failed 1");
else
{