1
1

Included patch from Cygwin package: Fix crash on names with slashes from /proc/registry

git-svn-id: svn://blicky.net/ncdu/trunk@33 ce56bc8d-f834-0410-b703-f827bd498a76
Этот коммит содержится в:
yorhel 2008-08-02 11:14:48 +00:00
родитель 6621d70d99
Коммит cd2ade76c6

Просмотреть файл

@ -275,6 +275,16 @@ int calcDir(struct dir *dest, char *path) {
d->name = malloc(strlen(f)+1);
strcpy(d->name, f);
#ifdef __CYGWIN__
/* /proc/registry names may contain slashes */
if(strchr(d->name, '/') || strchr(d->name, '\\')) {
serr = 1;
errno = 0;
d->flags |= FF_ERR;
continue;
}
#endif
/* get full path */
strcpy(tmp, path);
strcat(tmp, f);