Problem: Coverity complains about dereferencing NULL value
Solution: Check that cms2 is not null
closes: #16438
Signed-off-by: Christian Brabandt <cb@256bit.org>
{
// Also delete 'commentstring' if it matches.
cms2 = (char_u *)strstr((char *)cms, "%s");
- if (p - line >= cms2 - cms
+ if (cms2 != NULL && p - line >= cms2 - cms
&& STRNCMP(p - (cms2 - cms), cms, cms2 - cms) == 0
&& STRNCMP(p + len, cms2 + 2, STRLEN(cms2 + 2)) == 0)
{
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1015,
/**/
1014,
/**/