Maybe it would be a bit safer if we checked that stok ends with "cscope:" rather than contains?

--- if_cscope.c (revision 199)
+++ if_cscope.c (working copy)
@@ -630,7 +630,7 @@
         */
        if ((stok = strtok(buf, (const char *)" ")) == NULL)
            continue;
-       if (strcmp((const char *)stok, "cscope:"))
+       if (strstr((const char *)stok, "cscope:") == NULL)
            continue;

        if ((stok = strtok(NULL, (const char *)" ")) == NULL)

Reply via email to