diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-05 02:42:15 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-05 02:42:15 +0000 |
commit | 147d2ab4949aec9a3b510e1ee43399a9e6261122 (patch) | |
tree | f46fda625ab9ad40defcf6ff9895bff1e3934b90 | |
parent | 372e3e53ba4f3291e4de081d313e4d50b970ba71 (diff) | |
download | cygnal-147d2ab4949aec9a3b510e1ee43399a9e6261122.tar.gz cygnal-147d2ab4949aec9a3b510e1ee43399a9e6261122.tar.bz2 cygnal-147d2ab4949aec9a3b510e1ee43399a9e6261122.zip |
* dtable.cc (handle_to_fn): Correct placement and length of name buffer.
(Suggested by Pavel Tsekov)
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/dtable.cc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c9ae24341..d07cf257a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 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. * fhandler.h: Move fcntl.h include here. (fhandler_base::set_flags): Accept supplied_bin argument. Make diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 6c532bc12..e2821db4b 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -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); |