]> granicus.if.org Git - file/commitdiff
indirect offsets should be relative to the beginning of the current magic.
authorChristos Zoulas <christos@zoulas.com>
Thu, 1 Jan 2015 04:12:23 +0000 (04:12 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 1 Jan 2015 04:12:23 +0000 (04:12 +0000)
src/softmagic.c

index f5c1896a76ef4b793c484cd3e7ab70d850512304..0bdfb377aece346906101c49035729ec32c1cc64 100644 (file)
@@ -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;