summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <cgf@redhat.com>2003-01-31 00:20:11 +0000
committerChristopher Faylor <cgf@redhat.com>2003-01-31 00:20:11 +0000
commitb4b3d2250aa27bdf36742231612bc15a75adf554 (patch)
treebaa26423f16c5e0b8979e71c3f237892c16e6105
parent4320b6fbf3f1ad6a13b4c30586b4608cb7f2c661 (diff)
downloadgdb-b4b3d2250aa27bdf36742231612bc15a75adf554.tar.gz
merge from trunk
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_registry.cc6
2 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cf819d90282..e1e54fe0a9f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-30 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
+ error when inspecting path.
+
2003-01-29 Christopher Faylor <cgf@redhat.com>
* lib/getopt.c: Allow environment variable control of POSIXLY_CORRECT
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc
index 2024416d8bf..f2a3d4875c8 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;