mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	patch 9.1.1015: Coverity complains about dereferencing NULL value
Problem: Coverity complains about dereferencing NULL value Solution: Check that cms2 is not null closes: #16438 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
		| @@ -1879,7 +1879,7 @@ foldDelMarker(linenr_T lnum, char_u *marker, int markerlen) | ||||
| 	    { | ||||
| 		// 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) | ||||
| 		{ | ||||
|   | ||||
| @@ -704,6 +704,8 @@ static char *(features[]) = | ||||
|  | ||||
| static int included_patches[] = | ||||
| {   /* Add new patch number below this line */ | ||||
| /**/ | ||||
|     1015, | ||||
| /**/ | ||||
|     1014, | ||||
| /**/ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user