+2007-05-10 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * backend/comics/comics-document.c: (comics_regex_quote),
+ (extract_argv):
+
+ Correctly quote symbols. Fixes crash in the bug
+ #415370.
+
2007-05-10 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* shell/ev-navigation-action-widget.c:
{
char *ret, *d;
- d = ret = g_malloc (strlen (s) * 2 + 3);
+ d = ret = g_malloc (strlen (s) * 4 + 3);
*d++ = '\'';
case '*':
case '\\':
case '\'':
+ *d++ = '\'';
*d++ = '\\';
+ *d++ = '\'';
break;
}
*d = *s;
ComicsDocument *comics_document = COMICS_DOCUMENT (document);
char **argv;
char *command_line, *quoted_archive, *quoted_filename;
+ GError *err = NULL;
quoted_archive = g_shell_quote (comics_document->archive);
if (comics_document->regex_arg) {
comics_document->extract_command,
quoted_archive,
quoted_filename);
- g_shell_parse_argv (command_line, NULL, &argv, NULL);
+ g_shell_parse_argv (command_line, NULL, &argv, &err);
+
+ if (err) {
+ g_warning ("Error %s", err->message);
+ return NULL;
+ }
+
g_free (command_line);
g_free (quoted_archive);
g_free (quoted_filename);