1 2008-08-30 12:54 Christos Zoulas <christos@astron.com>
3 * Don't eat trailing \n in magic enties.
5 * Cast defines to allow compilation using a c++ compiler.
7 2008-07-26 00:59 Reuben Thomas <rrt@sc3d.org>
9 * Add MIME types for special files.
11 * Use access to give more accurate information for files that
16 2008-07-02 11:15 Christos Zoulas <christos@astron.com>
18 * add !:strength op to adjust magic strength (experimental)
20 2008-06-16 21:41 Reuben Thomas <rrt@sc3d.org>
22 * Fix automake error in configure.ac.
24 * Add MIME type for Psion Sketch files.
26 2008-06-05 08:59 Christos Zoulas <christos@astron.com>
28 * Don't print warnings about bad namesize in stripped
29 binaries with PT_NOTE is still there, and the actual
30 note is gone (Jakub Jelinek)
32 2008-05-28 15:12 Robert Byrnes <byrnes@wildpumpkin.net>
35 Note invalid byte order for little-endian SPARC32PLUS.
36 Add SPARC V9 vendor extensions and memory model.
39 Pass target machine to doshn (for Solaris hardware capabilities).
41 * src/readelf.c (doshn):
42 Add support for Solaris hardware/software capabilities.
47 * src/vasprintf.c (dispatch):
48 Add support for ll modifier.
50 2008-05-16 10:25 Christos Zoulas <christos@astron.com>
52 * Fix compiler warnings.
54 * remove stray printf, and fix a vprintf bug. (Martin Dorey)
56 2008-05-06 00:13 Robert Byrnes <byrnes@wildpumpkin.net>
59 Ensure that getopt_long and [v]asprintf are included in libmagic,
62 Remove unnecessary EXTRA_DIST.
67 * src/vasprintf.c (dispatch):
68 Fix variable precision bug: be sure to step past '*'.
70 * src/vasprintf.c (core):
71 Remove unreachable code.
73 * src/apprentice.c (set_test_type):
74 Add cast to avoid compiler warning.
76 2008-04-22 23:45 Christos Zoulas <christos@astron.com>
78 * Add magic submission guidelines (Abel Cheung)
80 * split msdos and windows magic (Abel Cheung)
82 2008-04-04 11:00 Christos Zoulas <christos@astron.com>
84 * >= <= is not supported, so fix the magic and warn about it.
85 reported by: Thien-Thi Nguyen <ttn@gnuvola.org>
87 2008-03-27 16:16 Robert Byrnes <byrnes@wildpumpkin.net>
89 * src/readelf.c (donote):
90 ELF core file command name/line bug fixes and enhancements:
92 Try larger offsets first to avoid false matches
93 from earlier data that happen to look like strings;
94 this primarily affected SunOS 5.x 32-bit Intel core files.
96 Add support for command line (instead of just short name)
99 Add information about NT_PSINFO for SunOS 5.x.
101 Only trim whitespace from end of command line.
103 2007-02-11 01:36 Reuben Thomas <rrt@sc3d.org>
105 * Change strength of ! from MULT to 0, as it matches almost
106 anything (Reuben Thomas)
108 * Debian fixes (Reuben Thomas)
110 2007-02-11 00:17 Reuben Thomas <rrt@sc3d.org>
112 * Clarify UTF-8 BOM message (Reuben Thomas)
114 * Add HTML comment to token list in names.h
116 2007-02-04 15:50 Christos Zoulas <christos@astron.com>
118 * Debian fixes (Reuben Thomas)
120 2007-02-04 11:31 Christos Zoulas <christos@astron.com>
122 * !:mime annotations in magic files (Reuben Thomas)
124 2007-01-29 15:35 Christos Zoulas <christos@astron.com>
126 * zero out utime/utimes structs (Gavin Atkinson)
128 2007-01-26 13:45 Christos Zoulas <christos@astron.com>
130 * reduce writable data from Diego "Flameeyes" Petten
132 2007-12-28 15:06 Christos Zoulas <christos@astron.com>
136 * remove bogus regex magic that could cause a DoS
138 * better mismatch version message
140 2007-12-27 11:35 Christos Zoulas <christos@astron.com>
142 * bring back some fixes from OpenBSD
144 * treat ELF dynamic objects as executables
148 2007-12-01 19:55 Christos Zoulas <christos@astron.com>
150 * make sure we have zlib.h and libz to compile the builtin
153 2007-10-28 20:48 Christos Zoulas <christos@astron.com>
155 * float and double magic support (Behan Webster)
157 2007-10-28 20:48 Christos Zoulas <christos@astron.com>
159 * Convert fortran to a soft test (Reuben Thomas)
161 2007-10-23 5:25 Christos Zoulas <christos@astron.com>
163 * Add --with-filename, and --no-filename (Reuben Thomas)
165 2007-10-23 3:59 Christos Zoulas <christos@astron.com>
167 * Rest of the mime split (Reuben Thomas)
169 * Make usage message generated from the flags so that
170 they stay consistent (Reuben Thomas)
172 2007-10-20 3:06 Christos Zoulas <christos@astron.com>
174 * typo in comment, missing ifdef QUICK, remove unneeded code
177 2007-10-17 3:33 Christos Zoulas <christos@astron.com>
179 * Fix problem printing -\012 in some entries
181 * Separate magic type and encoding flags (Reuben Thomas)
183 2007-10-09 3:55 Christos Zoulas <christos@astron.com>
185 * configure fix for int64 and strndup (Reuben Thomas)
187 2007-09-26 4:45 Christos Zoulas <christos@astron.com>
189 * Add magic_descriptor() function.
191 * Fix regression in elf reading code where the core name was
194 * Don't convert NUL's to spaces in {l,b}estring16 (Daniel Dawson)
196 2007-08-19 6:30 Christos Zoulas <christos@astron.com>
198 * Make mime format consistent so that it can
200 mimetype [charset=character-set] [encoding=encoding-mime-type]
202 Remove spurious extra text from some MIME type printouts
205 Fix one case where -i produced nothing at all (for a 1-byte file,
206 which is now classed as application/octet-stream).
208 Remove 7/8bit classifications, since they were arbitrary
209 and not based on the file data.
211 This work was done by Reuben Thomas
213 2007-05-24 10:00 Christos Zoulas <christos@astron.com>
215 * Fix another integer overflow (Colin Percival)
217 2007-03-26 13:58 Christos Zoulas <christos@astron.com>
219 * make sure that all of struct magic_set is initialized appropriately
222 2007-03-25 17:44 Christos Zoulas <christos@astron.com>
224 * reset left bytes in the buffer (Dmitry V. Levin)
226 * compilation failed with COMPILE_ONLY and ENABLE_CONDITIONALS
229 2007-03-15 10:51 Christos Zoulas <christos@astron.com>
231 * fix fortran and nroff reversed tests (Dmitry V. Levin)
233 * fix exclude option (Dmitry V. Levin)
235 2007-02-08 17:30 Christos Zoulas <christos@astron.com>
237 * fix integer underflow in file_printf which can lead to
238 to exploitable heap overflow (Jean-Sebastien Guay-Lero)
240 2007-02-05 11:35 Christos Zoulas <christos@astron.com>
242 * make socket/pipe reading more robust
244 2007-01-25 16:01 Christos Zoulas <christos@astron.com>
246 * Centralize all the tests in file_buffer.
250 2007-01-18 05:29 Anon Ymous <do@not.spam.me>
252 * Move the "type" detection code from parse() into its own table
253 driven routine. This avoids maintaining multiple lists in
256 * Add an optional conditional field (ust before the type field).
257 This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is
260 2007-01-16 23:24 Anon Ymous <do@not.spam.me>
262 * Fix an initialization bug in check_mem().
264 2007-01-16 14:58 Anon Ymous <do@not.spam.me>
266 * Add a "default" type to print a message if nothing previously
267 matched at that level or since the last default at that
268 level. This is useful for setting up switch-like statements.
269 It can also be used to do if/else constructions without a
270 redundant second test.
272 * Fix the "x" special case test so that one can test for that
275 * Allow "search" to search the entire buffer if the "/N"
276 search count is missing.
278 * Make "regex" work! It now starts its search at the
279 specified offset and takes an (optional) "/N" line count to
280 specify the search range; otherwise it searches to the end
281 of the file. The match is now grabbed correctly for format
282 strings and the offset set to the end of the match.
284 * Add a "/s" flag to "regex" and "search" to set the offset to
285 the start of the match. By default the offset is set to the
286 end of the match, as it is with other tests. This is mostly
289 * Make "search", "string" and "pstring" use the same
290 file_strncmp() routine so that they support the same flags;
291 "bestring16" and "lestring16" call the same routine, but
292 with flags = 0. Also add a "/C" flag (in analogy to "/c")
293 to ignore the case on uppercase (lowercase) characters in
296 * Strict adherence to C style string escapes. A warnings are
297 printed when compiling. Note: previously "\a" was
298 incorrectly translated to 'a' instead of an <alert> (i.e.,
299 BELL, typically 0x07).
301 * Make this compile with "-Wall -Wextra" and all the warning
302 flags used with WARNS=4 in the NetBSD source. Also make it
305 * Many "cleanups" and hopefully not too many new bugs!
307 2007-01-16 14:56 Anon Ymous <do@not.spam.me>
309 * make several more files compile with gcc warnings
310 on and also make them pass lint.
312 2007-01-16 14:54 Anon Ymous <do@not.spam.me>
314 * fix a puts()/putc() usage goof in file.c
316 * make file.c compile with gcc warnings and pass lint
318 2006-12-11 16:49 Christos Zoulas <christos@astron.com>
320 * fix byteswapping issue
322 * report the number of bytes we tried to
323 allocate when allocation fails
325 * add a few missed cases in the strength routine
327 2006-12-08 16:32 Christos Zoulas <christos@astron.com>
329 * store and print the line number of the magic
332 * if the magic entry did not print anything,
333 don't treat it as a match
335 * change the magic strength algorithm to take
336 into account the relationship op.
338 * fix a bug in search where we could accidentally
341 * propagate the error return from match to
344 2006-11-25 13:35 Christos Zoulas <christos@astron.com>
346 * Don't store the current offset in the magic
347 struct, because it needs to be restored and
348 it was not done properly all the time. Bug
349 found by: Arkadiusz Miskiewicz
351 * Fix problem in the '\0' separator; and don't
352 print it as an additional separator; print
353 it as the only separator.
355 2006-11-17 10:51 Christos Zoulas <christos@astron.com>
357 * Added a -0 option to print a '\0' separator
358 Etienne Buira <etienne.buira@free.fr>
360 2006-10-31 15:14 Christos Zoulas <christos@astron.com>
362 * Check offset before copying (Mike Frysinger)
364 * merge duplicated code
366 * add quad date support
368 * make sure that we nul terminate desc (Ryoji Kanai)
370 * don't process elf notes multiple times
372 * allow -z to report empty compressed files
374 * use calloc to initialize the ascii buffers (Jos van den Oever)
376 2006-06-08 11:11 Christos Zoulas <christos@astron.com>
378 * QNX fixes (Mike Gorchak)
382 * FIFO checks (Dr. Werner Fink)
384 * Linux ELF fixes (Dr. Werner Fink)
386 * Magic format checks (Dr. Werner Fink)
388 * Magic format function improvent (Karl Chen)
390 2006-05-03 11:11 Christos Zoulas <christos@astron.com>
392 * Pick up some elf changes and some constant fixes from SUSE
394 * Identify gnu tar vs. posix tar
396 * When keep going, don't print spurious newlines (Radek Vokál)
398 2006-04-01 12:02 Christos Zoulas <christos@astron.com>
400 * Use calloc instead of malloc (Mike Frysinger)
402 * Fix configure script to detect wctypes.h (Mike Frysinger)
404 2006-03-02 16:06 Christos Zoulas <christos@astron.com>
406 * Print empty if the file is (Mike Frysinger)
408 * Don't try to read past the end of the buffer (Mike Frysinger)
410 * Sort magic entries by strength [experimental]
412 2005-11-29 13:26 Christos Zoulas <christos@astron.com>
414 * Use iswprint() to convert the output string.
417 2005-10-31 8:54 Christos Zoulas <christos@astron.com>
419 * Fix regression where the core info was not completely processed
422 2005-10-20 11:15 Christos Zoulas <christos@astron.com>
424 * Middle Endian magic (Diomidis Spinellis)
426 2005-10-17 11:15 Christos Zoulas <christos@astron.com>
428 * Open with O_BINARY for CYGWIN (Corinna Vinschen)
430 * Don't close stdin (Arkadiusz Miskiewicz)
432 * Look for note sections in non executables.
434 2005-09-20 13:33 Christos Zoulas <christos@astron.com>
436 * Don't print SVR4 Style in core files multiple times
439 2005-08-27 04:09 Christos Zoulas <christos@astron.com>
441 * Cygwin changes Corinna Vinschen
443 2005-08-18 09:53 Christos Zoulas <christos@astron.com>
445 * Remove erroreous mention of /etc/magic in the file man page
446 This is gentoo bug 101639. (Mike Frysinger)
448 * Cross-compile support and detection (Mike Frysinger)
450 2005-08-12 10:17 Christos Zoulas <christos@astron.com>
452 * Add -h flag and dereference symlinks if POSIXLY_CORRECT
455 2005-07-29 13:57 Christos Zoulas <christos@astron.com>
457 * Avoid search and regex buffer overflows (Kelledin)
459 2005-07-12 11:48 Christos Zoulas <christos@astron.com>
461 * Provide stub implementations for {v,}nsprintf() for older
462 OS's that don't have them.
463 * Change mbstate_t autoconf detection macro from AC_MBSTATE_T
464 to AC_TYPE_MBSTATE_T.
466 2005-06-25 11:48 Christos Zoulas <christos@astron.com>
468 * Dynamically allocate the string buffers and make the
469 default read size 256K.
471 2005-06-01 00:00 Joerg Sonnenberger <joerg@britannica.bec.de>
473 * Dragonfly ELF note support
475 2005-03-14 00:00 Giuliano Bertoletti <gb@symbolic.it>
477 * Avoid NULL pointer dereference in time conversion.
479 2005-03-06 00:00 Joerg Walter <jwalt@mail.garni.ch>
481 * Add indirect magic offset support, and search mode.
483 2005-01-12 00:00 Stepan Kasal <kasal@ucw.cz>
485 * src/ascmagic.c (file_ascmagic): Fix three bugs about text files:
486 If a CRLF text file happens to have CR at offset HOWMANY - 1
487 (currently 0xffff), it should not be counted as CR line
489 If a line has length exactly MAXLINELEN, it should not yet be
490 treated as a ``very long line'', as MAXLINELEN is ``longest sane
492 With CRLF, the line length was not computed correctly, and even
493 lines of length MAXLINELEN - 1 were treated as ``very long''.
495 2004-12-07 14:15 Christos Zoulas <christos@astron.com>
497 * bzip2 needs a lot of input buffer space on some files
498 before it can begin uncompressing. This makes file -z
499 fail on some bz2 files. Fix it by giving it a copy of
500 the file descriptor to read as much as it wants if we
501 have access to it. <christos@astron.com>
503 2004-11-24 12:39 Christos Zoulas <christos@astron.com>
505 * Stack smash fix, and ELF more conservative reading.
506 Jakub Bogusz <qboosh@pld-linux.org>
508 2004-11-20 18:50 Christos Zoulas <christos@astron.com>
510 * New FreeBSD version parsing code:
511 Jon Noack <noackjr@alumni.rice.edu>
513 * Hackish support for ucs16 strings <christos@astron.com>
515 2004-11-13 03:07 Christos Zoulas <christos@astron.com>
517 * print the file name and line number in syntax errors.
519 2004 10-12 10:50 Christos Zoulas <christos@astron.com>
521 * Fix stack overwriting on 0 length strings: Tim Waugh
522 <twaugh@redhat.com> Ned Ludd <solar@gentoo.org>
524 2004-09-27 11:30 Christos Zoulas <christos@astron.com>
526 * Remove 3rd and 4th copyright clause; approved by Ian Darwin.
528 * Fix small memory leaks; caught by: Tamas Sarlos
529 <stamas@csillag.ilab.sztaki.hu>
531 2004-07-24 16:33 Christos Zoulas <christos@astron.com>
533 * magic.mime update Danny Milosavljevic <danny.milo@gmx.net>
535 * FreeBSD version update Oliver Eikemeier <eikemeier@fillmore-labs.com>
537 * utime/utimes detection Ian Lance Taylor <ian@wasabisystems.com>
539 * errors reading elf magic Jakub Bogusz <qboosh@pld-linux.org>
541 2004-04-12 10:55 Christos Zoulas <christos@astron.com>
543 * make sure that magic formats match magic types during compilation
545 * fix broken sgi magic file
547 2004-04-06 20:36 Christos Zoulas <christos@astron.com>
549 * detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com>
553 2004-03-22 15:25 Christos Zoulas <christos@astron.com>
556 (Joerg Ostertag) <ostertag@rechengilde.de>
558 * FreeBSD ELF version handling
559 (Edwin Groothuis) <edwin@mavetju.org>
561 * correct cleanup in all cases; don't just close the file.
562 (Christos Zoulas) <christos@astron.com>
564 * add gettext message catalogue support
565 (Michael Piefel) <piefel@debian.org>
567 * better printout for unreadable files
568 (Michael Piefel) <piefel@debian.org>
570 * compensate for missing MAXPATHLEN
571 (Michael Piefel) <piefel@debian.org>
573 * add wide character string length computation
574 (Michael Piefel) <piefel@debian.org>
576 * Avoid infinite loops caused by bad elf alignments
577 or name and description note sizes. Reported by
578 (Mikael Magnusson) <mmikael@comhem.se>
580 2004-03-09 13:55 Christos Zoulas <christos@astron.com>
582 * Fix possible memory leak on error and add missing regfree
583 (Dmitry V. Levin) <ldv@altlinux.org>
585 2003-12-23 12:12 Christos Zoulas <christos@astron.com>
587 * fix -k flag (Maciej W. Rozycki)
589 2003-11-18 14:10 Christos Zoulas <christos@astron.com>
591 * Try to give us much info as possible on corrupt elf files.
592 (Willy Tarreau) <willy@w.ods.org>
593 * Updated python bindings (Brett Funderburg)
594 <brettf@deepfile.com>
596 2003-11-11 15:03 Christos Zoulas <christos@astron.com>
598 * Include file.h first, because it includes config.h
599 breaks largefile test macros otherwise.
600 (Paul Eggert <eggert@CS.UCLA.EDU> via
601 Lars Hecking <lhecking@nmrc.ie>)
603 2003-10-14 21:39 Christos Zoulas <christos@astron.com>
605 * Python bindings (Brett Funderburg) <brettf@deepfile.com>
606 * Don't lookup past the end of the buffer
607 (Chad Hanson) <chanson@tcs-sec.com>
608 * Add MAGIC_ERROR and api on magic_errno()
610 2003-10-08 12:40 Christos Zoulas <christos@astron.com>
612 * handle error conditions from compile as fatal
613 (Antti Kantee) <pooka@netbsd.org>
614 * handle magic filename parsing sanely
616 * fix a memory leak (Illes Marton) <illes.marton@balabit.hu>
617 * describe magic file handling
618 (Bryan Henderson) <bryanh@giraffe-data.com>
620 2003-09-12 15:09 Christos Zoulas <christos@astron.com>
622 * update magic files.
623 * remove largefile support from file.h; it breaks things on most OS's
625 2003-08-10 10:25 Christos Zoulas <christos@astron.com>
627 * fix unmapping'ing of mmaped files.
629 2003-07-10 12:03 Christos Zoulas <christos@astron.com>
631 * don't exit with -1 on error; always exit 1 (Marty Leisner)
632 * restore utimes code.
634 2003-06-10 17:03 Christos Zoulas <christos@astron.com>
636 * make sure we don't access uninitialized memory.
638 * #ifdef __cplusplus in magic.h
640 2003-05-25 19:23 Christos Zoulas <christos@astron.com>
642 * rename cvs magic file to revision to deal with
643 case insensitive filesystems.
645 2003-05-23 17:03 Christos Zoulas <christos@astron.com>
647 * documentation fixes from Michael Piefel <piefel@debian.org>
648 * magic fixes (various)
649 * revert basename magic in .mgc name determination
650 * buffer protection in uncompress,
653 Maciej W. Rozycki <macro@ds2.pg.gda.pl
655 2003-04-21 20:12 Christos Zoulas <christos@astron.com>
659 2003-04-04 16:59 Christos Zoulas <christos@astron.com>
661 * fix operand sort order in string.
663 2003-04-02 17:30 Christos Zoulas <christos@astron.com>
665 * cleanup namespace in magic.h
667 2003-04-02 13:50 Christos Zoulas <christos@astron.com>
669 * Magic additions (Alex Ott)
670 * Fix bug that broke VPATH compilation (Peter Breitenlohner)
672 2003-03-28 16:03 Christos Zoulas <christos@astron.com>
674 * remove packed attribute from magic struct.
675 * make the magic struct properly aligned.
676 * bump version number of compiled files to 2.
678 2003-03-27 13:10 Christos Zoulas <christos@astron.com>
680 * separate tar detection and run it before softmagic.
681 * fix reversed symlink test.
682 * fix version printing.
683 * make separator a string instead of a char.
684 * update manual page and sort options.
686 2003-03-26 11:00 Christos Zoulas <christos@astron.com>
689 * make NULL in magic_file mean stdin
690 * Fix "-" argument to file to pass NULL to magic_file
691 * avoid pointer casts by using memcpy
692 * rename magic_buf -> magic_buffer
693 * keep only the first error
694 * manual page: new sentence, new line
695 * fix typo in api function (magic_buf -> magic_buffer)