Properly escape quotes in process_escape_args() library function
authorJustin Pettit <jpettit@nicira.com>
Tue, 2 Mar 2010 01:52:12 +0000 (17:52 -0800)
committerJustin Pettit <jpettit@nicira.com>
Tue, 2 Mar 2010 06:26:27 +0000 (22:26 -0800)
lib/process.c

index 3916886..af867ef 100644 (file)
@@ -103,7 +103,7 @@ process_escape_args(char **argv)
         if (argp != argv) {
             ds_put_char(&ds, ' ');
         }
-        if (arg[strcspn(arg, " \t\r\n\v\\")]) {
+        if (arg[strcspn(arg, " \t\r\n\v\\\'\"")]) {
             ds_put_char(&ds, '"');
             for (p = arg; *p; p++) {
                 if (*p == '\\' || *p == '\"') {