From: Christos Zoulas Date: Wed, 31 Dec 2003 18:36:22 +0000 (+0000) Subject: Off by one in the continuation flushing part. X-Git-Tag: FILE4_08~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f690b17e33b8fda50ebd0554e54bd4bbcdb17db3;p=file Off by one in the continuation flushing part. --- 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;