From 2a0983c049f3f5f11b07b927a94e73e5e0f58935 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 31 Dec 2003 18:36:22 +0000 Subject: [PATCH] Off by one in the continuation flushing part. --- src/softmagic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/softmagic.c b/src/softmagic.c index 0172ba25..6de903b8 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -44,7 +44,7 @@ #ifndef lint -FILE_RCSID("@(#)$Id: softmagic.c,v 1.63 2003/10/15 01:51:24 christos Exp $") +FILE_RCSID("@(#)$Id: softmagic.c,v 1.64 2003/12/31 18:36:22 christos Exp $") #endif /* lint */ private int match(struct magic_set *, struct magic *, uint32_t, @@ -133,7 +133,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, * main entry didn't match, * flush its continuations */ - while (magindex < nmagic && + while (magindex < nmagic - 1 && magic[magindex + 1].cont_level != 0) magindex++; continue; -- 2.50.1