Blame SOURCES/file-5.11-softmagic-read.patch

0233e9
diff --git a/src/softmagic.c b/src/softmagic.c
0233e9
index 8d08cad..8262788 100644
0233e9
--- a/src/softmagic.c
0233e9
+++ b/src/softmagic.c
0233e9
@@ -199,9 +199,9 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
0233e9
 		if (file_check_mem(ms, ++cont_level) == -1)
0233e9
 			return -1;
0233e9
 
0233e9
-		while (magic[magindex+1].cont_level != 0 &&
0233e9
-		    ++magindex < nmagic) {
0233e9
-			m = &magic[magindex];
0233e9
+		while (magindex + 1 < nmagic &&
0233e9
+			magic[magindex + 1].cont_level != 0) {
0233e9
+			m = &magic[++magindex];
0233e9
 			ms->line = m->lineno; /* for messages */
0233e9
 
0233e9
 			if (cont_level < m->cont_level)