From: Christos Zoulas Date: Thu, 1 Jan 2015 04:12:23 +0000 (+0000) Subject: indirect offsets should be relative to the beginning of the current magic. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb3e2bd602486130a7576246b53308ea1012fabb;p=file indirect offsets should be relative to the beginning of the current magic. --- diff --git a/src/softmagic.c b/src/softmagic.c index 3612b03c..37ba5dd1 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: softmagic.c,v 1.204 2014/12/11 12:34:24 christos Exp $") +FILE_RCSID("@(#)$File: softmagic.c,v 1.205 2015/01/01 04:12:23 christos Exp $") #endif /* lint */ #include "magic.h" @@ -1665,6 +1665,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, break; case FILE_INDIRECT: + offset += o; if (offset == 0) return 0;