Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / contrib / file-4 / ChangeLog
1
2 2007-02-08 17:30 Christos Zoulas <christos@zoulas.com>
3
4         * fix integer underflow in file_printf which can lead to
5           to exploitable heap overflow (Jean-Sebastien Guay-Lero)
6
7 2007-02-05 11:35 Christos Zoulas <christos@zoulas.com>
8
9         * make socket/pipe reading more robust
10
11 2007-01-25 16:01 Christos Zoulas <christos@zoulas.com>
12
13         * Centralize all the tests in file_buffer.
14
15         * Add exclude flag.
16
17 2007-01-18 05:29 Anon Ymous <do@not.spam.me>
18         
19         * Move the "type" detection code from parse() into its own table
20           driven routine.  This avoids maintaining multiple lists in
21           file.h.
22
23         * Add an optional conditional field (ust before the type field).
24           This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is
25           likely to go away.
26         
27 2007-01-16 23:24 Anon Ymous <do@not.spam.me>
28
29         * Fix an initialization bug in check_mem().
30
31 2007-01-16 14:58 Anon Ymous <do@not.spam.me>
32
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.
38
39         * Fix the "x" special case test so that one can test for that
40           string with "=x".
41
42         * Allow "search" to search the entire buffer if the "/N"
43           search count is missing.
44
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.
50
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
54           useful for "regex".
55
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
61           the test string.
62
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).
67
68         * Make this compile with "-Wall -Wextra" and all the warning
69           flags used with WARNS=4 in the NetBSD source.  Also make it
70           pass lint.
71
72         * Many "cleanups" and hopefully not too many new bugs!
73
74 2007-01-16 14:56 Anon Ymous <do@not.spam.me>
75
76         * make several more files compile with gcc warnings
77           on and also make them pass lint.
78
79 2007-01-16 14:54 Anon Ymous <do@not.spam.me>
80
81         * fix a puts()/putc() usage goof in file.c
82
83         * make file.c compile with gcc warnings and pass lint
84
85 2006-12-11 16:49 Christos Zoulas <christos@zoulas.com>
86
87         * fix byteswapping issue
88
89         * report the number of bytes we tried to
90           allocate when allocation fails
91
92         * add a few missed cases in the strength routine
93
94 2006-12-08 16:32 Christos Zoulas <christos@zoulas.com>
95
96         * store and print the line number of the magic
97           entry for debugging.         
98
99         * if the magic entry did not print anything,
100           don't treat it as a match
101
102         * change the magic strength algorithm to take
103           into account the relationship op.
104
105         * fix a bug in search where we could accidentally
106           return a match.
107
108         * propagate the error return from match to
109           file_softmagic.
110
111 2006-11-25 13:35 Christos Zoulas <christos@zoulas.com>
112         
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
117
118         * Fix problem in the '\0' separator; and don't
119           print it as an additional separator; print
120           it as the only separator.
121
122 2006-11-17 10:51 Christos Zoulas <christos@zoulas.com>
123
124         * Added a -0 option to print a '\0' separator
125           Etienne Buira <etienne.buira@free.fr>
126
127 2006-10-31 15:14 Christos Zoulas <christos@zoulas.com>
128
129         * Check offset before copying (Mike Frysinger)
130
131         * merge duplicated code
132
133         * add quad date support
134
135         * make sure that we nul terminate desc (Ryoji Kanai)
136
137         * don't process elf notes multiple times
138
139         * allow -z to report empty compressed files
140
141         * use calloc to initialize the ascii buffers (Jos van den Oever)
142
143 2006-06-08 11:11 Christos Zoulas <christos@zoulas.com>
144
145         * QNX fixes (Mike Gorchak)
146
147         * Add quad support.
148
149         * FIFO checks (Dr. Werner Fink)
150
151         * Linux ELF fixes (Dr. Werner Fink)
152
153         * Magic format checks (Dr. Werner Fink)
154
155         * Magic format function improvent (Karl Chen)
156
157 2006-05-03 11:11 Christos Zoulas <christos@zoulas.com>
158
159         * Pick up some elf changes and some constant fixes from SUSE
160
161         * Identify gnu tar vs. posix tar
162
163         * When keep going, don't print spurious newlines (Radek Vokál)
164
165 2006-04-01 12:02 Christos Zoulas <christos@zoulas.com>
166
167         * Use calloc instead of malloc (Mike Frysinger)
168
169         * Fix configure script to detect wctypes.h (Mike Frysinger)
170
171 2006-03-02 16:06 Christos Zoulas <christos@zoulas.com>
172
173         * Print empty if the file is (Mike Frysinger)
174
175         * Don't try to read past the end of the buffer (Mike Frysinger)
176
177         * Sort magic entries by strength [experimental]
178
179 2005-11-29 13:26 Christos Zoulas <christos@zoulas.com>
180
181         * Use iswprint() to convert the output string.
182             (Bastien Nocera)
183
184 2005-10-31 8:54 Christos Zoulas <christos@zoulas.com>
185
186         * Fix regression where the core info was not completely processed
187             (Radek Vokál)
188
189 2005-10-20 11:15 Christos Zoulas <christos@zoulas.com>
190
191         * Middle Endian magic (Diomidis Spinellis)
192
193 2005-10-17 11:15 Christos Zoulas <christos@zoulas.com>
194
195         * Open with O_BINARY for CYGWIN (Corinna Vinschen)
196
197         * Don't close stdin (Arkadiusz Miskiewicz)
198
199         * Look for note sections in non executables.
200
201 2005-09-20 13:33 Christos Zoulas <christos@zoulas.com>
202         
203         * Don't print SVR4 Style in core files multiple times
204             (Radek Vokál)
205
206 2005-08-27 04:09 Christos Zoulas <christos@zoulas.com>
207
208         * Cygwin changes Corinna Vinschen
209
210 2005-08-18 09:53 Christos Zoulas <christos@zoulas.com>
211
212         * Remove erroreous mention of /etc/magic in the file man page
213           This is gentoo bug 101639. (Mike Frysinger) 
214
215         * Cross-compile support and detection (Mike Frysinger) 
216
217 2005-08-12 10:17 Christos Zoulas <christos@zoulas.com>
218
219         * Add -h flag and dereference symlinks if POSIXLY_CORRECT
220           is set.
221
222 2005-07-29 13:57 Christos Zoulas <christos@zoulas.com>
223
224         * Avoid search and regex buffer overflows (Kelledin)
225
226 2005-07-12 11:48 Christos Zoulas <christos@zoulas.com>
227
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.
232
233 2005-06-25 11:48 Christos Zoulas <christos@zoulas.com>
234
235         * Dynamically allocate the string buffers and make the
236           default read size 256K.
237
238 2005-06-01 00:00 Joerg Sonnenberger <joerg@britannica.bec.de>
239
240         * Dragonfly ELF note support
241
242 2005-03-14 00:00 Giuliano Bertoletti <gb@symbolic.it>
243
244         * Avoid NULL pointer dereference in time conversion.
245
246 2005-03-06 00:00  Joerg Walter <jwalt@mail.garni.ch>
247         
248         * Add indirect magic offset support, and search mode.
249
250 2005-01-12 00:00  Stepan Kasal  <kasal@ucw.cz>
251
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
255           terminator.
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
258           line length''.
259           With CRLF, the line length was not computed correctly, and even
260           lines of length MAXLINELEN - 1 were treated as ``very long''.
261
262 2004-12-07 14:15  Christos Zoulas  <christos@zoulas.com>
263
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>
269
270 2004-11-24 12:39  Christos Zoulas  <christos@zoulas.com>
271
272         * Stack smash fix, and ELF more conservative reading.
273           Jakub Bogusz <qboosh@pld-linux.org>
274
275 2004-11-20 18:50  Christos Zoulas  <christos@zoulas.com>
276
277         * New FreeBSD version parsing code:
278           Jon Noack <noackjr@alumni.rice.edu>
279
280         * Hackish support for ucs16 strings <christos@zoulas.com>
281
282 2004-11-13 03:07  Christos Zoulas  <christos@zoulas.com>
283
284         * print the file name and line number in syntax errors.
285
286 2004 10-12 10:50  Christos Zoulas  <christos@zoulas.com>
287
288         * Fix stack overwriting on 0 length strings: Tim Waugh
289             <twaugh@redhat.com> Ned Ludd <solar@gentoo.org>
290
291 2004-09-27 11:30  Christos Zoulas  <christos@zoulas.com>
292
293         * Remove 3rd and 4th copyright clause; approved by Ian Darwin.
294
295         * Fix small memory leaks; caught by: Tamas Sarlos 
296             <stamas@csillag.ilab.sztaki.hu>
297
298 2004-07-24 16:33  Christos Zoulas  <christos@zoulas.com>
299
300         * magic.mime update Danny Milosavljevic <danny.milo@gmx.net> 
301
302         * FreeBSD version update Oliver Eikemeier <eikemeier@fillmore-labs.com>
303
304         * utime/utimes detection Ian Lance Taylor <ian@wasabisystems.com>
305
306         * errors reading elf magic Jakub Bogusz <qboosh@pld-linux.org>
307
308 2004-04-12 10:55  Christos Zoulas  <christos@zoulas.com>
309
310         * make sure that magic formats match magic types during compilation
311
312         * fix broken sgi magic file
313
314 2004-04-06 20:36  Christos Zoulas  <christos@zoulas.com>
315
316         * detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com>
317
318         * magic fixes
319
320 2004-03-22 15:25  Christos Zoulas  <christos@zoulas.com>
321
322         * Lots of mime fixes
323           (Joerg Ostertag) <ostertag@rechengilde.de>
324
325         * FreeBSD ELF version handling
326           (Edwin Groothuis) <edwin@mavetju.org>
327
328         * correct cleanup in all cases; don't just close the file.
329           (Christos Zoulas) <christos@zoulas.com>
330
331         * add gettext message catalogue support
332           (Michael Piefel) <piefel@debian.org>
333
334         * better printout for unreadable files
335           (Michael Piefel) <piefel@debian.org>
336
337         * compensate for missing MAXPATHLEN
338           (Michael Piefel) <piefel@debian.org>
339
340         * add wide character string length computation
341           (Michael Piefel) <piefel@debian.org>
342
343         * Avoid infinite loops caused by bad elf alignments
344           or name and description note sizes. Reported by
345           (Mikael Magnusson) <mmikael@comhem.se>
346
347 2004-03-09 13:55  Christos Zoulas  <christos@zoulas.com>
348
349         * Fix possible memory leak on error and add missing regfree
350           (Dmitry V. Levin) <ldv@altlinux.org>
351
352 2003-12-23 12:12  Christos Zoulas  <christos@zoulas.com>
353
354         * fix -k flag (Maciej W. Rozycki)
355
356 2003-11-18 14:10  Christos Zoulas  <christos@zoulas.com>
357
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>
362
363 2003-11-11 15:03  Christos Zoulas  <christos@zoulas.com>
364
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>)
369
370 2003-10-14 21:39  Christos Zoulas  <christos@zoulas.com>
371
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()
376
377 2003-10-08 12:40  Christos Zoulas  <christos@zoulas.com>
378
379         * handle error conditions from compile as fatal
380           (Antti Kantee) <pooka@netbsd.org>
381         * handle magic filename parsing sanely
382         * more magic fixes.
383         * fix a memory leak (Illes Marton) <illes.marton@balabit.hu>
384         * describe magic file handling
385           (Bryan Henderson) <bryanh@giraffe-data.com>
386
387 2003-09-12 15:09  Christos Zoulas  <christos@zoulas.com>
388
389         * update magic files.
390         * remove largefile support from file.h; it breaks things on most OS's
391
392 2003-08-10 10:25  Christos Zoulas  <christos@zoulas.com>
393
394         * fix unmapping'ing of mmaped files.
395
396 2003-07-10 12:03  Christos Zoulas  <christos@zoulas.com>
397
398         * don't exit with -1 on error; always exit 1 (Marty Leisner)
399         * restore utimes code.
400
401 2003-06-10 17:03  Christos Zoulas  <christos@zoulas.com>
402
403         * make sure we don't access uninitialized memory.
404         * pass lint
405         * #ifdef __cplusplus in magic.h
406
407 2003-05-25 19:23  Christos Zoulas  <christos@zoulas.com>
408
409         * rename cvs magic file to revision to deal with
410           case insensitive filesystems.
411
412 2003-05-23 17:03  Christos Zoulas  <christos@zoulas.com>
413
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,
418           signness issues,
419           close files
420           Maciej W. Rozycki <macro@ds2.pg.gda.pl
421
422 2003-04-21 20:12  Christos Zoulas  <christos@zoulas.com>
423
424         * fix zsh magic
425
426 2003-04-04 16:59  Christos Zoulas  <christos@zoulas.com>
427
428         * fix operand sort order in string.
429
430 2003-04-02 17:30  Christos Zoulas  <christos@zoulas.com>
431
432         * cleanup namespace in magic.h
433
434 2003-04-02 13:50  Christos Zoulas  <christos@zoulas.com>
435
436         * Magic additions (Alex Ott)
437         * Fix bug that broke VPATH compilation (Peter Breitenlohner)
438
439 2003-03-28 16:03  Christos Zoulas  <christos@zoulas.com>
440
441         * remove packed attribute from magic struct.
442         * make the magic struct properly aligned.
443         * bump version number of compiled files to 2.
444
445 2003-03-27 13:10  Christos Zoulas  <christos@zoulas.com>
446
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.
452
453 2003-03-26 11:00  Christos Zoulas  <christos@zoulas.com>
454
455         * Pass lint
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)