vim-patch:8.0.1442: using pointer before it is set

Problem:    Using pointer before it is set.
Solution:   Search in whole buffer instead of next token.

a172b63ab8
This commit is contained in:
Marco Hinz 2018-02-26 14:40:44 +01:00
parent 81a520e60e
commit e237cff0c8
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -574,7 +574,7 @@ static int cs_cnt_matches(size_t idx)
// Display/discard any output that doesn't match what we want.
// 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) {