2004-09-22 Pierre Humblet <pierre.humblet@ieee.org>
* path.cc (normalize_win32_path): Only look for : in second position. Avoid infinite loop with names starting in double dots. (mount_info::conv_to_win32_path): Do not worry about a trailing dot. (hash_path_name): Ditto.
This commit is contained in:
parent
602de58268
commit
20e474d7b8
@ -1,3 +1,10 @@
|
|||||||
|
2004-09-22 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
|
* path.cc (normalize_win32_path): Only look for : in second position.
|
||||||
|
Avoid infinite loop with names starting in double dots.
|
||||||
|
(mount_info::conv_to_win32_path): Do not worry about a trailing dot.
|
||||||
|
(hash_path_name): Ditto.
|
||||||
|
|
||||||
2004-09-20 Christopher Faylor <cgf@timesys.com>
|
2004-09-20 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* exceptions.cc (sig_handle_tty_stop): Set flag earlier.
|
* exceptions.cc (sig_handle_tty_stop): Set flag earlier.
|
||||||
|
@ -978,7 +978,7 @@ normalize_win32_path (const char *src, char *dst, char **tail)
|
|||||||
src += 2;
|
src += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (strchr (src, ':') == NULL && *src != '/')
|
else if (!isdrive(src) && *src != '/')
|
||||||
{
|
{
|
||||||
if (beg_src_slash)
|
if (beg_src_slash)
|
||||||
dst += cygheap->cwd.get_drive (dst);
|
dst += cygheap->cwd.get_drive (dst);
|
||||||
@ -1023,6 +1023,7 @@ normalize_win32_path (const char *src, char *dst, char **tail)
|
|||||||
int n = strspn (src, ".");
|
int n = strspn (src, ".");
|
||||||
if (!src[n] || isdirsep (src[n])) /* just dots... */
|
if (!src[n] || isdirsep (src[n])) /* just dots... */
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
|
*dst++ = *src++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Otherwise, add char to result. */
|
/* Otherwise, add char to result. */
|
||||||
@ -1454,8 +1455,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
|
|||||||
int n = mount_table->cygdrive_len - 1;
|
int n = mount_table->cygdrive_len - 1;
|
||||||
int unit;
|
int unit;
|
||||||
|
|
||||||
if (!src_path[n] ||
|
if (!src_path[n])
|
||||||
(src_path[n] == '/' && src_path[n + 1] == '.' && !src_path[n + 2]))
|
|
||||||
{
|
{
|
||||||
unit = 0;
|
unit = 0;
|
||||||
dst[0] = '\0';
|
dst[0] = '\0';
|
||||||
@ -3249,15 +3249,13 @@ hash_path_name (__ino64_t hash, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
hashit:
|
hashit:
|
||||||
/* Build up hash. Ignore single trailing slash or \a\b\ != \a\b or
|
/* Build up hash. Name is already normalized */
|
||||||
\a\b\. but allow a single \ if that's all there is. */
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
int ch = cyg_tolower (*name);
|
int ch = cyg_tolower (*name);
|
||||||
hash = ch + (hash << 6) + (hash << 16) - hash;
|
hash = ch + (hash << 6) + (hash << 16) - hash;
|
||||||
}
|
}
|
||||||
while (*++name != '\0' &&
|
while (*++name != '\0');
|
||||||
!(*name == '\\' && (!name[1] || (name[1] == '.' && !name[2]))));
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user