]> granicus.if.org Git - vim/commitdiff
patch 8.0.1442: using pointer before it is set v8.0.1442
authorBram Moolenaar <Bram@vim.org>
Tue, 30 Jan 2018 21:52:06 +0000 (22:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 30 Jan 2018 21:52:06 +0000 (22:52 +0100)
Problem:    Using pointer before it is set.
Solution:   Search in whole buffer instead of next token.

src/if_cscope.c
src/version.c

index 9466c34f9d015cfac54623fb69b4c3a3dd117f9b..4bf28ad1d1c0c808f72a4d41cd505b05e4ee8831 100644 (file)
@@ -702,7 +702,7 @@ cs_cnt_matches(int idx)
         * Accept "\S*cscope: X lines", also matches "mlcscope".
         * Bail out for the "Unable to search" error.
         */
-       if (strstr((const char *)stok, "Unable to search database") != NULL)
+       if (strstr((const char *)buf, "Unable to search database") != NULL)
            break;
        if ((stok = strtok(buf, (const char *)" ")) == NULL)
            continue;
index 1cee1481fcedc457f93b14042fbdeae3abc9cf46..43e89a284784aaeef5c5280d6b287e265a27a351 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1442,
 /**/
     1441,
 /**/