From 618c2e86a6ad455b42f7b97b63823191218e46d6 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Fri, 4 Apr 2008 15:01:09 +0000 Subject: [PATCH] we don't support <= and >= so don't allow it. --- ChangeLog | 17 +++-------------- src/apprentice.c | 13 ++++++++++++- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90526139..f914917d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,19 +1,8 @@ -2008-03-27 16:16 Robert Byrnes +2008-04-04 11:00 Christos Zoulas - * 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 2007-02-11 01:36 Reuben Thomas diff --git a/src/apprentice.c b/src/apprentice.c index 58f51146..cd054f4d 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -49,7 +49,7 @@ #include #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 '^': -- 2.40.0