* util.c (strip_home_and_password): Fixed possible buffer overflow.
Этот коммит содержится в:
родитель
2f059780af
Коммит
07d52482c6
@ -1,3 +1,7 @@
|
||||
2004-09-19 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* util.c (strip_home_and_password): Fixed possible buffer overflow.
|
||||
|
||||
2004-09-19 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* find.c: Applied patch to make the find dialog more responsive
|
||||
|
@ -460,13 +460,13 @@ const char *strip_home_and_password(const char *dir)
|
||||
if (home_dir && !strncmp (dir, home_dir, len = strlen (home_dir)) &&
|
||||
(dir[len] == PATH_SEP || dir[len] == '\0')){
|
||||
newdir [0] = '~';
|
||||
strcpy (&newdir [1], &dir [len]);
|
||||
g_strlcpy (&newdir [1], &dir [len], sizeof(newdir) - 1);
|
||||
return newdir;
|
||||
}
|
||||
|
||||
/* We do not strip homes in /#ftp tree, I do not like ~'s there
|
||||
(see ftpfs.c why) */
|
||||
strcpy (newdir, dir);
|
||||
g_strlcpy (newdir, dir, sizeof(newdir));
|
||||
strip_password (newdir, 1);
|
||||
return newdir;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user