]> granicus.if.org Git - vim/commitdiff
patch 9.0.0743: starting cscope on Unix does not quote the arguments right v9.0.0743
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Oct 2022 15:34:30 +0000 (16:34 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Oct 2022 15:34:30 +0000 (16:34 +0100)
Problem:    Starting cscope on Unix does not quote the arguments correctly.
            (Gary Johnson)
Solution:   Move the final quote after the arguments.

src/if_cscope.c
src/version.c

index 809475039c1dc79b49232e03b5c7f29c9f6f5c6e..3252ff4916befbcb99ae1dfe4c7bb91756d1bc3f 100644 (file)
@@ -954,7 +954,7 @@ err_closing:
 
        // run the cscope command
 #ifdef UNIX
-       vim_snprintf(cmd, cmdlen, "/bin/sh -c \"exec %s -dl -f %s\"",
+       vim_snprintf(cmd, cmdlen, "/bin/sh -c \"exec %s -dl -f %s",
                                                        prog, csinfo[i].fname);
 #else
        vim_snprintf(cmd, cmdlen, "%s -dl -f %s", prog, csinfo[i].fname);
@@ -970,6 +970,9 @@ err_closing:
            vim_snprintf(cmd + len, cmdlen - len, " %s", csinfo[i].flags);
        }
 # ifdef UNIX
+       // terminate the -c command argument
+       STRCAT(cmd, "\"");
+
        // on Win32 we still need prog
        vim_free(prog);
 # endif
index 467f8e083690bff984cb60eb589c11ec9dd27b4f..de1c5ce4cd3023879815e877eede83d174781252 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    743,
 /**/
     742,
 /**/