Blame SOURCES/file-5.33-whitespace-compare.patch

d7e7c0
diff -urp file-5.33.orig/src/softmagic.c file-5.33/src/softmagic.c
d7e7c0
--- file-5.33.orig/src/softmagic.c	2018-04-15 14:49:15.000000000 -0400
d7e7c0
+++ file-5.33/src/softmagic.c	2020-12-14 12:21:13.298285158 -0500
d7e7c0
@@ -1758,7 +1758,9 @@ file_strncmp(const char *s1, const char
d7e7c0
 	 */
d7e7c0
 	const unsigned char *a = (const unsigned char *)s1;
d7e7c0
 	const unsigned char *b = (const unsigned char *)s2;
d7e7c0
-	const unsigned char *eb = b + len;
d7e7c0
+	uint32_t ws = flags & (STRING_COMPACT_WHITESPACE |
d7e7c0
+		STRING_COMPACT_OPTIONAL_WHITESPACE);
d7e7c0
+	const unsigned char *eb = b + (ws ? strlen(s2) : len);
d7e7c0
 	uint64_t v;
d7e7c0
 
d7e7c0
 	/*