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-Tag: FILE5_22~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4075d47c8debe0b2d413c1cf0f01b8f48813756c;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 f5c1896a..0bdfb377 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.203 2014/12/04 15:22:05 christos Exp $") +FILE_RCSID("@(#)$File: softmagic.c,v 1.204 2014/12/11 12:34:24 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;