]> granicus.if.org Git - file/commitdiff
we don't support <= and >= so don't allow it.
authorChristos Zoulas <christos@zoulas.com>
Fri, 4 Apr 2008 15:01:09 +0000 (15:01 +0000)
committerChristos Zoulas <christos@zoulas.com>
Fri, 4 Apr 2008 15:01:09 +0000 (15:01 +0000)
ChangeLog
src/apprentice.c

index 9052613979cf39503967495f483b6106aaaa6512..f914917df9d4de77d49389670e74ed89c31d0cac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,19 +1,8 @@
        
-2008-03-27 16:16  Robert Byrnes  <byrnes@wildpumpkin.net>
+2008-04-04 11:00  Christos Zoulas  <christos@astron.com>
 
-        * src/readelf.c (donote):
-         ELF core file command name/line bug fixes and enhancements:
-
-         Try larger offsets first to avoid false matches
-         from earlier data that happen to look like strings;
-         this primarily affected SunOS 5.x 32-bit Intel core files.
-
-         Add support for command line (instead of just short name)
-         for SunOS 5.x.
-
-         Add information about NT_PSINFO for SunOS 5.x.
-
-         Only trim whitespace from end of command line.
+        * >= <= is not supported, so fix the magic and warn about it.
+         reported by: Thien-Thi Nguyen <ttn@gnuvola.org>
 
 2007-02-11 01:36 Reuben Thomas <rrt@sc3d.org>
 
index 58f51146ec59da0730b0373ecea613554105507e..cd054f4de2f460f1c46ee99b913e7b3b669b6b89 100644 (file)
@@ -49,7 +49,7 @@
 #include <dirent.h>
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.131 2008/03/01 22:21:48 rrt Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.132 2008/03/28 18:19:30 christos Exp $")
 #endif /* lint */
 
 #define        EATAB {while (isascii((unsigned char) *l) && \
@@ -1261,6 +1261,17 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
        switch (*l) {
        case '>':
        case '<':
+               m->reln = *l;
+               ++l;
+               if (*l == '=') {
+                       if (ms->flags & MAGIC_CHECK) {
+                               file_magwarn(ms, "%c= not supported",
+                                   m->reln);
+                               return -1;
+                       }
+                  ++l;
+               }
+               break;
        /* Old-style anding: "0 byte &0x80 dynamically linked" */
        case '&':
        case '^':