[patch] handle_to_fn: null terminate
Brian Dessent
brian@dessent.net
Sat Mar 8 01:39:00 GMT 2008
I noticed in strace some lines like:
fhandler_base::close: closing
'/Device/NamedPipe/Win32Pipes.000008e0.00000002<several junk bytes>'
handle 0x740
This was caused by handle_to_fn simply forgetting to add a \0 when
converting, as in the attached patch.
Brian
-------------- next part --------------
2008-03-07 Brian Dessent <brian@dessent.net>
* dtable.cc (handle_to_fn): Null-terminate posix_fn in the case
of justslash = true.
Index: dtable.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/dtable.cc,v
retrieving revision 1.182
diff -u -p -r1.182 dtable.cc
--- dtable.cc 15 Feb 2008 17:53:10 -0000 1.182
+++ dtable.cc 8 Mar 2008 01:33:52 -0000
@@ -952,6 +952,7 @@ handle_to_fn (HANDLE h, char *posix_fn)
*d = '/';
else
*d = *s;
+ *d = 0;
}
debug_printf ("derived path '%s', posix '%s'", w32, posix_fn);
More information about the Cygwin-patches
mailing list