]> granicus.if.org Git - file/commitdiff
We now support negative level 0 offsets (from the end of the file), so this
authorChristos Zoulas <christos@zoulas.com>
Sat, 29 Jun 2019 22:31:04 +0000 (22:31 +0000)
committerChristos Zoulas <christos@zoulas.com>
Sat, 29 Jun 2019 22:31:04 +0000 (22:31 +0000)
code will not be re-enabled (petk)

src/apprentice.c

index eca3ae06af99ed16addab813af23ef83d7d67a3e..7ebd6897bd0484c7afb99f81433353b155f69747 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.283 2019/02/20 02:35:27 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.284 2019/06/29 22:31:04 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -1926,17 +1926,7 @@ parse(struct magic_set *ms, struct magic_entry *me, const char *line,
                        file_magwarn(ms, "offset `%s' invalid", l);
                return -1;
        }
-#if 0
-        if (m->offset < 0 && cont_level != 0 &&
-           (m->flag & (OFFADD | INDIROFFADD)) == 0) {
-               if (ms->flags & MAGIC_CHECK) {
-                       file_magwarn(ms,
-                           "negative direct offset `%s' at level %u",
-                           l, cont_level);
-               }
-               return -1;
-       }
-#endif
+
         l = t;
 
        if (m->flag & INDIR) {