* extfs.c (extfs_cmd): Quote localname - it's based on the entry

name, so it can contain dangerous symbols like "&".
This commit is contained in:
Pavel Roskin 2003-03-11 00:01:56 +00:00
parent 867704615b
commit 4d548cc4b1
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-03-10 Pavel Roskin <proski@gnu.org>
* extfs.c (extfs_cmd): Quote localname - it's based on the entry
name, so it can contain dangerous symbols like "&".
2003-02-26 Adam Byrtek <alpha@debian.org>
* extfs.c (extfs_open): Retain original filename as a suffix

View File

@ -584,6 +584,7 @@ extfs_cmd (const char *extfs_cmd, struct archive *archive,
{
char *file;
char *quoted_file;
char *quoted_localname;
char *archive_name;
char *mc_extfsdir;
char *cmd;
@ -593,12 +594,14 @@ extfs_cmd (const char *extfs_cmd, struct archive *archive,
quoted_file = name_quote (file, 0);
g_free (file);
archive_name = name_quote (get_archive_name (archive), 0);
quoted_localname = name_quote (localname, 0);
mc_extfsdir = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR);
cmd = g_strconcat (mc_extfsdir, extfs_prefixes[archive->fstype],
extfs_cmd, archive_name, " ", quoted_file, " ",
localname, NULL);
quoted_localname, NULL);
g_free (quoted_file);
g_free (quoted_localname);
g_free (mc_extfsdir);
g_free (archive_name);