mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
* direntry.c (vfs_s_resolve_symlink): Check vfs_s_fullpath()
return value to avoid NULL dereference. Reported by wwp <subscript@free.fr>.
This commit is contained in:
parent
2f7bbc2c31
commit
02db8a9660
@ -1,5 +1,9 @@
|
||||
2004-03-07 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* direntry.c (vfs_s_resolve_symlink): Check vfs_s_fullpath()
|
||||
return value to avoid NULL dereference.
|
||||
Reported by wwp <subscript@free.fr>.
|
||||
|
||||
* vfs.c (mc_def_ungetlocalcopy): Fix missed "%s".
|
||||
* utilvfs.c (vfs_parse_ls_lga): Likewise.
|
||||
|
||||
|
@ -217,9 +217,11 @@ vfs_s_resolve_symlink (struct vfs_class *me, struct vfs_s_entry *entry,
|
||||
/* make full path from relative */
|
||||
if (*linkname != PATH_SEP) {
|
||||
char *fullpath = vfs_s_fullpath (me, entry->dir);
|
||||
fullname = g_strconcat (fullpath, "/", linkname, NULL);
|
||||
linkname = fullname;
|
||||
g_free (fullpath);
|
||||
if (fullpath) {
|
||||
fullname = g_strconcat (fullpath, "/", linkname, NULL);
|
||||
linkname = fullname;
|
||||
g_free (fullpath);
|
||||
}
|
||||
}
|
||||
|
||||
target =
|
||||
|
Loading…
Reference in New Issue
Block a user