2 2007-02-08 17:30 Christos Zoulas <christos@zoulas.com>
4 * fix integer underflow in file_printf which can lead to
5 to exploitable heap overflow (Jean-Sebastien Guay-Lero)
7 2007-02-05 11:35 Christos Zoulas <christos@zoulas.com>
9 * make socket/pipe reading more robust
11 2007-01-25 16:01 Christos Zoulas <christos@zoulas.com>
13 * Centralize all the tests in file_buffer.
17 2007-01-18 05:29 Anon Ymous <do@not.spam.me>
19 * Move the "type" detection code from parse() into its own table
20 driven routine. This avoids maintaining multiple lists in
23 * Add an optional conditional field (ust before the type field).
24 This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is
27 2007-01-16 23:24 Anon Ymous <do@not.spam.me>
29 * Fix an initialization bug in check_mem().
31 2007-01-16 14:58 Anon Ymous <do@not.spam.me>
33 * Add a "default" type to print a message if nothing previously
34 matched at that level or since the last default at that
35 level. This is useful for setting up switch-like statements.
36 It can also be used to do if/else constructions without a
37 redundant second test.
39 * Fix the "x" special case test so that one can test for that
42 * Allow "search" to search the entire buffer if the "/N"
43 search count is missing.
45 * Make "regex" work! It now starts its search at the
46 specified offset and takes an (optional) "/N" line count to
47 specify the search range; otherwise it searches to the end
48 of the file. The match is now grabbed correctly for format
49 strings and the offset set to the end of the match.
51 * Add a "/s" flag to "regex" and "search" to set the offset to
52 the start of the match. By default the offset is set to the
53 end of the match, as it is with other tests. This is mostly
56 * Make "search", "string" and "pstring" use the same
57 file_strncmp() routine so that they support the same flags;
58 "bestring16" and "lestring16" call the same routine, but
59 with flags = 0. Also add a "/C" flag (in analogy to "/c")
60 to ignore the case on uppercase (lowercase) characters in
63 * Strict adherence to C style string escapes. A warnings are
64 printed when compiling. Note: previously "\a" was
65 incorrectly translated to 'a' instead of an <alert> (i.e.,
66 BELL, typically 0x07).
68 * Make this compile with "-Wall -Wextra" and all the warning
69 flags used with WARNS=4 in the NetBSD source. Also make it
72 * Many "cleanups" and hopefully not too many new bugs!
74 2007-01-16 14:56 Anon Ymous <do@not.spam.me>
76 * make several more files compile with gcc warnings
77 on and also make them pass lint.
79 2007-01-16 14:54 Anon Ymous <do@not.spam.me>
81 * fix a puts()/putc() usage goof in file.c
83 * make file.c compile with gcc warnings and pass lint
85 2006-12-11 16:49 Christos Zoulas <christos@zoulas.com>
87 * fix byteswapping issue
89 * report the number of bytes we tried to
90 allocate when allocation fails
92 * add a few missed cases in the strength routine
94 2006-12-08 16:32 Christos Zoulas <christos@zoulas.com>
96 * store and print the line number of the magic
99 * if the magic entry did not print anything,
100 don't treat it as a match
102 * change the magic strength algorithm to take
103 into account the relationship op.
105 * fix a bug in search where we could accidentally
108 * propagate the error return from match to
111 2006-11-25 13:35 Christos Zoulas <christos@zoulas.com>
113 * Don't store the current offset in the magic
114 struct, because it needs to be restored and
115 it was not done properly all the time. Bug
116 found by: Arkadiusz Miskiewicz
118 * Fix problem in the '\0' separator; and don't
119 print it as an additional separator; print
120 it as the only separator.
122 2006-11-17 10:51 Christos Zoulas <christos@zoulas.com>
124 * Added a -0 option to print a '\0' separator
125 Etienne Buira <etienne.buira@free.fr>
127 2006-10-31 15:14 Christos Zoulas <christos@zoulas.com>
129 * Check offset before copying (Mike Frysinger)
131 * merge duplicated code
133 * add quad date support
135 * make sure that we nul terminate desc (Ryoji Kanai)
137 * don't process elf notes multiple times
139 * allow -z to report empty compressed files
141 * use calloc to initialize the ascii buffers (Jos van den Oever)
143 2006-06-08 11:11 Christos Zoulas <christos@zoulas.com>
145 * QNX fixes (Mike Gorchak)
149 * FIFO checks (Dr. Werner Fink)
151 * Linux ELF fixes (Dr. Werner Fink)
153 * Magic format checks (Dr. Werner Fink)
155 * Magic format function improvent (Karl Chen)
157 2006-05-03 11:11 Christos Zoulas <christos@zoulas.com>
159 * Pick up some elf changes and some constant fixes from SUSE
161 * Identify gnu tar vs. posix tar
163 * When keep going, don't print spurious newlines (Radek Vokál)
165 2006-04-01 12:02 Christos Zoulas <christos@zoulas.com>
167 * Use calloc instead of malloc (Mike Frysinger)
169 * Fix configure script to detect wctypes.h (Mike Frysinger)
171 2006-03-02 16:06 Christos Zoulas <christos@zoulas.com>
173 * Print empty if the file is (Mike Frysinger)
175 * Don't try to read past the end of the buffer (Mike Frysinger)
177 * Sort magic entries by strength [experimental]
179 2005-11-29 13:26 Christos Zoulas <christos@zoulas.com>
181 * Use iswprint() to convert the output string.
184 2005-10-31 8:54 Christos Zoulas <christos@zoulas.com>
186 * Fix regression where the core info was not completely processed
189 2005-10-20 11:15 Christos Zoulas <christos@zoulas.com>
191 * Middle Endian magic (Diomidis Spinellis)
193 2005-10-17 11:15 Christos Zoulas <christos@zoulas.com>
195 * Open with O_BINARY for CYGWIN (Corinna Vinschen)
197 * Don't close stdin (Arkadiusz Miskiewicz)
199 * Look for note sections in non executables.
201 2005-09-20 13:33 Christos Zoulas <christos@zoulas.com>
203 * Don't print SVR4 Style in core files multiple times
206 2005-08-27 04:09 Christos Zoulas <christos@zoulas.com>
208 * Cygwin changes Corinna Vinschen
210 2005-08-18 09:53 Christos Zoulas <christos@zoulas.com>
212 * Remove erroreous mention of /etc/magic in the file man page
213 This is gentoo bug 101639. (Mike Frysinger)
215 * Cross-compile support and detection (Mike Frysinger)
217 2005-08-12 10:17 Christos Zoulas <christos@zoulas.com>
219 * Add -h flag and dereference symlinks if POSIXLY_CORRECT
222 2005-07-29 13:57 Christos Zoulas <christos@zoulas.com>
224 * Avoid search and regex buffer overflows (Kelledin)
226 2005-07-12 11:48 Christos Zoulas <christos@zoulas.com>
228 * Provide stub implementations for {v,}nsprintf() for older
229 OS's that don't have them.
230 * Change mbstate_t autoconf detection macro from AC_MBSTATE_T
231 to AC_TYPE_MBSTATE_T.
233 2005-06-25 11:48 Christos Zoulas <christos@zoulas.com>
235 * Dynamically allocate the string buffers and make the
236 default read size 256K.
238 2005-06-01 00:00 Joerg Sonnenberger <joerg@britannica.bec.de>
240 * Dragonfly ELF note support
242 2005-03-14 00:00 Giuliano Bertoletti <gb@symbolic.it>
244 * Avoid NULL pointer dereference in time conversion.
246 2005-03-06 00:00 Joerg Walter <jwalt@mail.garni.ch>
248 * Add indirect magic offset support, and search mode.
250 2005-01-12 00:00 Stepan Kasal <kasal@ucw.cz>
252 * src/ascmagic.c (file_ascmagic): Fix three bugs about text files:
253 If a CRLF text file happens to have CR at offset HOWMANY - 1
254 (currently 0xffff), it should not be counted as CR line
256 If a line has length exactly MAXLINELEN, it should not yet be
257 treated as a ``very long line'', as MAXLINELEN is ``longest sane
259 With CRLF, the line length was not computed correctly, and even
260 lines of length MAXLINELEN - 1 were treated as ``very long''.
262 2004-12-07 14:15 Christos Zoulas <christos@zoulas.com>
264 * bzip2 needs a lot of input buffer space on some files
265 before it can begin uncompressing. This makes file -z
266 fail on some bz2 files. Fix it by giving it a copy of
267 the file descriptor to read as much as it wants if we
268 have access to it. <christos@zoulas.com>
270 2004-11-24 12:39 Christos Zoulas <christos@zoulas.com>
272 * Stack smash fix, and ELF more conservative reading.
273 Jakub Bogusz <qboosh@pld-linux.org>
275 2004-11-20 18:50 Christos Zoulas <christos@zoulas.com>
277 * New FreeBSD version parsing code:
278 Jon Noack <noackjr@alumni.rice.edu>
280 * Hackish support for ucs16 strings <christos@zoulas.com>
282 2004-11-13 03:07 Christos Zoulas <christos@zoulas.com>
284 * print the file name and line number in syntax errors.
286 2004 10-12 10:50 Christos Zoulas <christos@zoulas.com>
288 * Fix stack overwriting on 0 length strings: Tim Waugh
289 <twaugh@redhat.com> Ned Ludd <solar@gentoo.org>
291 2004-09-27 11:30 Christos Zoulas <christos@zoulas.com>
293 * Remove 3rd and 4th copyright clause; approved by Ian Darwin.
295 * Fix small memory leaks; caught by: Tamas Sarlos
296 <stamas@csillag.ilab.sztaki.hu>
298 2004-07-24 16:33 Christos Zoulas <christos@zoulas.com>
300 * magic.mime update Danny Milosavljevic <danny.milo@gmx.net>
302 * FreeBSD version update Oliver Eikemeier <eikemeier@fillmore-labs.com>
304 * utime/utimes detection Ian Lance Taylor <ian@wasabisystems.com>
306 * errors reading elf magic Jakub Bogusz <qboosh@pld-linux.org>
308 2004-04-12 10:55 Christos Zoulas <christos@zoulas.com>
310 * make sure that magic formats match magic types during compilation
312 * fix broken sgi magic file
314 2004-04-06 20:36 Christos Zoulas <christos@zoulas.com>
316 * detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com>
320 2004-03-22 15:25 Christos Zoulas <christos@zoulas.com>
323 (Joerg Ostertag) <ostertag@rechengilde.de>
325 * FreeBSD ELF version handling
326 (Edwin Groothuis) <edwin@mavetju.org>
328 * correct cleanup in all cases; don't just close the file.
329 (Christos Zoulas) <christos@zoulas.com>
331 * add gettext message catalogue support
332 (Michael Piefel) <piefel@debian.org>
334 * better printout for unreadable files
335 (Michael Piefel) <piefel@debian.org>
337 * compensate for missing MAXPATHLEN
338 (Michael Piefel) <piefel@debian.org>
340 * add wide character string length computation
341 (Michael Piefel) <piefel@debian.org>
343 * Avoid infinite loops caused by bad elf alignments
344 or name and description note sizes. Reported by
345 (Mikael Magnusson) <mmikael@comhem.se>
347 2004-03-09 13:55 Christos Zoulas <christos@zoulas.com>
349 * Fix possible memory leak on error and add missing regfree
350 (Dmitry V. Levin) <ldv@altlinux.org>
352 2003-12-23 12:12 Christos Zoulas <christos@zoulas.com>
354 * fix -k flag (Maciej W. Rozycki)
356 2003-11-18 14:10 Christos Zoulas <christos@zoulas.com>
358 * Try to give us much info as possible on corrupt elf files.
359 (Willy Tarreau) <willy@w.ods.org>
360 * Updated python bindings (Brett Funderburg)
361 <brettf@deepfile.com>
363 2003-11-11 15:03 Christos Zoulas <christos@zoulas.com>
365 * Include file.h first, because it includes config.h
366 breaks largefile test macros otherwise.
367 (Paul Eggert <eggert@CS.UCLA.EDU> via
368 Lars Hecking <lhecking@nmrc.ie>)
370 2003-10-14 21:39 Christos Zoulas <christos@zoulas.com>
372 * Python bindings (Brett Funderburg) <brettf@deepfile.com>
373 * Don't lookup past the end of the buffer
374 (Chad Hanson) <chanson@tcs-sec.com>
375 * Add MAGIC_ERROR and api on magic_errno()
377 2003-10-08 12:40 Christos Zoulas <christos@zoulas.com>
379 * handle error conditions from compile as fatal
380 (Antti Kantee) <pooka@netbsd.org>
381 * handle magic filename parsing sanely
383 * fix a memory leak (Illes Marton) <illes.marton@balabit.hu>
384 * describe magic file handling
385 (Bryan Henderson) <bryanh@giraffe-data.com>
387 2003-09-12 15:09 Christos Zoulas <christos@zoulas.com>
389 * update magic files.
390 * remove largefile support from file.h; it breaks things on most OS's
392 2003-08-10 10:25 Christos Zoulas <christos@zoulas.com>
394 * fix unmapping'ing of mmaped files.
396 2003-07-10 12:03 Christos Zoulas <christos@zoulas.com>
398 * don't exit with -1 on error; always exit 1 (Marty Leisner)
399 * restore utimes code.
401 2003-06-10 17:03 Christos Zoulas <christos@zoulas.com>
403 * make sure we don't access uninitialized memory.
405 * #ifdef __cplusplus in magic.h
407 2003-05-25 19:23 Christos Zoulas <christos@zoulas.com>
409 * rename cvs magic file to revision to deal with
410 case insensitive filesystems.
412 2003-05-23 17:03 Christos Zoulas <christos@zoulas.com>
414 * documentation fixes from Michael Piefel <piefel@debian.org>
415 * magic fixes (various)
416 * revert basename magic in .mgc name determination
417 * buffer protection in uncompress,
420 Maciej W. Rozycki <macro@ds2.pg.gda.pl
422 2003-04-21 20:12 Christos Zoulas <christos@zoulas.com>
426 2003-04-04 16:59 Christos Zoulas <christos@zoulas.com>
428 * fix operand sort order in string.
430 2003-04-02 17:30 Christos Zoulas <christos@zoulas.com>
432 * cleanup namespace in magic.h
434 2003-04-02 13:50 Christos Zoulas <christos@zoulas.com>
436 * Magic additions (Alex Ott)
437 * Fix bug that broke VPATH compilation (Peter Breitenlohner)
439 2003-03-28 16:03 Christos Zoulas <christos@zoulas.com>
441 * remove packed attribute from magic struct.
442 * make the magic struct properly aligned.
443 * bump version number of compiled files to 2.
445 2003-03-27 13:10 Christos Zoulas <christos@zoulas.com>
447 * separate tar detection and run it before softmagic.
448 * fix reversed symlink test.
449 * fix version printing.
450 * make separator a string instead of a char.
451 * update manual page and sort options.
453 2003-03-26 11:00 Christos Zoulas <christos@zoulas.com>
456 * make NULL in magic_file mean stdin
457 * Fix "-" argument to file to pass NULL to magic_file
458 * avoid pointer casts by using memcpy
459 * rename magic_buf -> magic_buffer
460 * keep only the first error
461 * manual page: new sentence, new line
462 * fix typo in api function (magic_buf -> magic_buffer)