* fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check

cygdrive string length for those who have cygdrive mapped to "/".
This commit is contained in:
Corinna Vinschen 2006-03-02 09:48:42 +00:00
parent d2493dc965
commit 471573dc77
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-03-02 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
cygdrive string length for those who have cygdrive mapped to "/".
2006-03-01 Corinna Vinschen <corinna@vinschen.de>
* sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME

View File

@ -114,10 +114,13 @@ public:
if (!found[__DIR_CYGDRIVE])
{
found[__DIR_CYGDRIVE] = true;
strncpy (ret_name, mount_table->cygdrive + 1,
mount_table->cygdrive_len - 2);
ret_name[mount_table->cygdrive_len - 2] = '\0';
return 2;
if (mount_table->cygdrive_len > 1)
{
strncpy (ret_name, mount_table->cygdrive + 1,
mount_table->cygdrive_len - 2);
ret_name[mount_table->cygdrive_len - 2] = '\0';
return 2;
}
}
}
return 0;