From 704ce461988df7280145d59b81ce39a344c23e3d Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 30 Jan 2003 23:15:15 +0000 Subject: * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one error when inspecting path. --- winsup/cygwin/fhandler_registry.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fhandler_registry.cc') diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 18e1db4dd..2d6aeb899 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -106,8 +106,10 @@ fhandler_registry::exists () const char *path = get_name (); debug_printf ("exists (%s)", path); - path += proc_len + registry_len + 2; - if (*path == 0) + path += proc_len + registry_len + 1; + if (*path) + path++; + else { file_type = 2; goto out; -- cgit v1.2.3