* fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one error when

inspecting path.
This commit is contained in:
Christopher Faylor 2003-01-30 23:15:15 +00:00
parent ca8def3d9a
commit 704ce46198
2 changed files with 9 additions and 2 deletions

View File

@ -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_INCORRECT

View File

@ -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;