Fix crash when there's a \' in the arguments.
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 15 Jun 2011 19:34:25 +0000 (15:34 -0400)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 15 Jun 2011 19:34:25 +0000 (15:34 -0400)
Fixes crash when calling Process.Start on a file with a ' in the path
when UseShellExecute is set to false.

Patch by Tom Philpot.

eglib/src/gshell.c

index f24c70ae5be9d1be692193e02c489c5effffc9b6..43b4c17870c5aa11006e12108372db290c212cbe 100644 (file)
@@ -225,7 +225,7 @@ g_shell_unquote (const gchar *quoted_string, GError **error)
                        }
                } else if (*p == '\\'){
                        char c = *(++p);
-                       if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == 0))
+                       if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == '\'' || c == 0 ))
                                g_string_append_c (result, '\\');
                        if (c == 0)
                                break;