Mercurial > pidgin
changeset 12134:9f34340f2445
[gaim-migrate @ 14434]
Smiley theme unpacking fixes:
Squash a warning about not checking the return value of system()
Add some more shell escaping
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 18 Nov 2005 14:49:47 +0000 |
parents | 8254bb99f929 |
children | e09bf5bc81d8 |
files | src/gtkprefs.c |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkprefs.c Fri Nov 18 13:54:20 2005 +0000 +++ b/src/gtkprefs.c Fri Nov 18 14:49:47 2005 +0000 @@ -464,7 +464,7 @@ static void theme_install_theme(char *path, char *extn) { #ifndef _WIN32 - gchar *command, *escaped; + gchar *command; #endif gchar *destdir; gchar *tail; @@ -485,9 +485,11 @@ * other platforms, if need be */ if (!g_ascii_strcasecmp(tail, ".gz") || !g_ascii_strcasecmp(tail, ".tgz")) { #ifndef _WIN32 - escaped = g_shell_quote(path); - command = g_strdup_printf("tar > /dev/null xzf %s -C %s", escaped, destdir); - g_free(escaped); + gchar *path_escaped = g_shell_quote(path); + gchar *destdir_escaped = g_shell_quote(destdir); + command = g_strdup_printf("tar > /dev/null xzf %s -C %s", path_escaped, destdir_escaped); + g_free(path_escaped); + g_free(destdir_escaped); #else if(!wgaim_gz_untar(path, destdir)) { g_free(destdir); @@ -502,7 +504,10 @@ #ifndef _WIN32 /* Fire! */ - system(command); + if (system(command)) + { + gaim_notify_error(NULL, NULL, _("Smiley theme failed to unpack."), NULL); + } g_free(command); #endif