* dtable.cc (handle_to_fn): Correct placement and length of name buffer.

(Suggested by Pavel Tsekov)
This commit is contained in:
Christopher Faylor 2002-06-05 02:42:15 +00:00
parent 372e3e53ba
commit 147d2ab494
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-06-04 Christopher Faylor <cgf@redhat.com>
* dtable.cc (handle_to_fn): Correct placement and length of name
buffer. (Suggested by Pavel Tsekov)
2002-06-04 Christopher Faylor <cgf@redhat.com>
Remove fcntl.h includes throughout.

View File

@ -726,8 +726,8 @@ handle_to_fn (HANDLE h, char *posix_fn)
memset (fnbuf, 0, sizeof (fnbuf));
ntfn = (OBJECT_NAME_INFORMATION *) fnbuf;
ntfn->Name.MaximumLength = sizeof (fnbuf);
ntfn->Name.Buffer = (WCHAR *) ntfn + 1;
ntfn->Name.MaximumLength = sizeof (fnbuf) - sizeof (*ntfn);
ntfn->Name.Buffer = (WCHAR *) (ntfn + 1);
DWORD res = NtQueryObject (h, ObjectNameInformation, ntfn, sizeof (fnbuf), NULL);