xref: /freebsd/contrib/file/ChangeLog (revision 1669d8afc64812c8d2d1d147ae1fd42ff441e1b1)
12007-12-28 15:06 Christos Zoulas <christos@zoulas.com>
2
3	* strtof detection
4
5	* remove bogus regex magic that could cause a DoS
6
7	* better mismatch version message
8
92007-12-27 11:35 Christos Zoulas <christos@zoulas.com>
10
11	* bring back some fixes from OpenBSD
12
13	* treat ELF dynamic objects as executables
14
15	* fix gcc warnings
16
172007-12-01 19:55 Christos Zoulas <christos@zoulas.com>
18
19	* make sure we have zlib.h and libz to compile the builtin
20	  decompress code
21
222007-10-28 20:48 Christos Zoulas <christos@zoulas.com>
23
24 	* float and double magic support (Behan Webster)
25
262007-10-28 20:48 Christos Zoulas <christos@zoulas.com>
27
28	* Convert fortran to a soft test (Reuben Thomas)
29
302007-10-23  5:25 Christos Zoulas <christos@zoulas.com>
31
32	* Add --with-filename, and --no-filename (Reuben Thomas)
33
342007-10-23  3:59 Christos Zoulas <christos@zoulas.com>
35
36	* Rest of the mime split (Reuben Thomas)
37
38	* Make usage message generated from the flags so that
39	  they stay consistent (Reuben Thomas)
40
412007-10-20  3:06 Christos Zoulas <christos@zoulas.com>
42
43	* typo in comment, missing ifdef QUICK, remove unneeded code
44		(Charles Longeau)
45
462007-10-17  3:33 Christos Zoulas <christos@zoulas.com>
47
48	* Fix problem printing -\012 in some entries
49
50	* Separate magic type and encoding flags (Reuben Thomas)
51
522007-10-09  3:55 Christos Zoulas <christos@zoulas.com>
53
54	* configure fix for int64 and strndup (Reuben Thomas)
55
562007-09-26  4:45 Christos Zoulas <christos@zoulas.com>
57
58	* Add magic_descriptor() function.
59
60	* Fix regression in elf reading code where the core name was
61	  not being printed.
62
63	* Don't convert NUL's to spaces in {l,b}estring16 (Daniel Dawson)
64
652007-08-19  6:30 Christos Zoulas <christos@zoulas.com>
66
67	* Make mime format consistent so that it can
68	  be easily parsed:
69	      mimetype [charset=character-set] [encoding=encoding-mime-type]
70
71	  Remove spurious extra text from some MIME type printouts
72	  (mostly in is_tar).
73
74	  Fix one case where -i produced nothing at all (for a 1-byte file,
75	  which is now classed as application/octet-stream).
76
77	  Remove 7/8bit classifications, since they were arbitrary
78	  and not based on the file data.
79
80	  This work was done by Reuben Thomas
81
822007-05-24 10:00 Christos Zoulas <christos@zoulas.com>
83
84	* Fix another integer overflow (Colin Percival)
85
862007-03-26 13:58 Christos Zoulas <christos@zoulas.com>
87
88	* make sure that all of struct magic_set is initialized appropriately
89	  (Brett)
90
912007-03-25 17:44 Christos Zoulas <christos@zoulas.com>
92
93	* reset left bytes in the buffer (Dmitry V. Levin)
94
95	* compilation failed with COMPILE_ONLY and ENABLE_CONDITIONALS
96	  (Peter Avalos)
97
982007-03-15 10:51 Christos Zoulas <christos@zoulas.com>
99
100	* fix fortran and nroff reversed tests (Dmitry V. Levin)
101
102	* fix exclude option (Dmitry V. Levin)
103
1042007-02-08 17:30 Christos Zoulas <christos@zoulas.com>
105
106	* fix integer underflow in file_printf which can lead to
107	  to exploitable heap overflow (Jean-Sebastien Guay-Lero)
108
1092007-02-05 11:35 Christos Zoulas <christos@zoulas.com>
110
111	* make socket/pipe reading more robust
112
1132007-01-25 16:01 Christos Zoulas <christos@zoulas.com>
114
115	* Centralize all the tests in file_buffer.
116
117	* Add exclude flag.
118
1192007-01-18 05:29 Anon Ymous <do@not.spam.me>
120
121	* Move the "type" detection code from parse() into its own table
122	  driven routine.  This avoids maintaining multiple lists in
123	  file.h.
124
125	* Add an optional conditional field (ust before the type field).
126	  This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is
127	  likely to go away.
128
1292007-01-16 23:24 Anon Ymous <do@not.spam.me>
130
131	* Fix an initialization bug in check_mem().
132
1332007-01-16 14:58 Anon Ymous <do@not.spam.me>
134
135	* Add a "default" type to print a message if nothing previously
136	  matched at that level or since the last default at that
137	  level.  This is useful for setting up switch-like statements.
138	  It can also be used to do if/else constructions without a
139	  redundant second test.
140
141	* Fix the "x" special case test so that one can test for that
142	  string with "=x".
143
144	* Allow "search" to search the entire buffer if the "/N"
145	  search count is missing.
146
147	* Make "regex" work!  It now starts its search at the
148	  specified offset and takes an (optional) "/N" line count to
149	  specify the search range; otherwise it searches to the end
150	  of the file.  The match is now grabbed correctly for format
151	  strings and the offset set to the end of the match.
152
153	* Add a "/s" flag to "regex" and "search" to set the offset to
154	  the start of the match.  By default the offset is set to the
155	  end of the match, as it is with other tests.  This is mostly
156	  useful for "regex".
157
158	* Make "search", "string" and "pstring" use the same
159	  file_strncmp() routine so that they support the same flags;
160	  "bestring16" and "lestring16" call the same routine, but
161	  with flags = 0.  Also add a "/C" flag (in analogy to "/c")
162	  to ignore the case on uppercase (lowercase) characters in
163	  the test string.
164
165	* Strict adherence to C style string escapes.  A warnings are
166	  printed when compiling.  Note: previously "\a" was
167	  incorrectly translated to 'a' instead of an <alert> (i.e.,
168	  BELL, typically 0x07).
169
170	* Make this compile with "-Wall -Wextra" and all the warning
171	  flags used with WARNS=4 in the NetBSD source.  Also make it
172	  pass lint.
173
174	* Many "cleanups" and hopefully not too many new bugs!
175
1762007-01-16 14:56 Anon Ymous <do@not.spam.me>
177
178	* make several more files compile with gcc warnings
179	  on and also make them pass lint.
180
1812007-01-16 14:54 Anon Ymous <do@not.spam.me>
182
183	* fix a puts()/putc() usage goof in file.c
184
185	* make file.c compile with gcc warnings and pass lint
186
1872006-12-11 16:49 Christos Zoulas <christos@zoulas.com>
188
189	* fix byteswapping issue
190
191	* report the number of bytes we tried to
192	  allocate when allocation fails
193
194	* add a few missed cases in the strength routine
195
1962006-12-08 16:32 Christos Zoulas <christos@zoulas.com>
197
198	* store and print the line number of the magic
199	  entry for debugging.
200
201	* if the magic entry did not print anything,
202	  don't treat it as a match
203
204	* change the magic strength algorithm to take
205	  into account the relationship op.
206
207	* fix a bug in search where we could accidentally
208	  return a match.
209
210	* propagate the error return from match to
211	  file_softmagic.
212
2132006-11-25 13:35 Christos Zoulas <christos@zoulas.com>
214
215	* Don't store the current offset in the magic
216	  struct, because it needs to be restored and
217	  it was not done properly all the time. Bug
218	  found by: Arkadiusz Miskiewicz
219
220	* Fix problem in the '\0' separator; and don't
221	  print it as an additional separator; print
222	  it as the only separator.
223
2242006-11-17 10:51 Christos Zoulas <christos@zoulas.com>
225
226	* Added a -0 option to print a '\0' separator
227	  Etienne Buira <etienne.buira@free.fr>
228
2292006-10-31 15:14 Christos Zoulas <christos@zoulas.com>
230
231	* Check offset before copying (Mike Frysinger)
232
233	* merge duplicated code
234
235	* add quad date support
236
237	* make sure that we nul terminate desc (Ryoji Kanai)
238
239	* don't process elf notes multiple times
240
241	* allow -z to report empty compressed files
242
243	* use calloc to initialize the ascii buffers (Jos van den Oever)
244
2452006-06-08 11:11 Christos Zoulas <christos@zoulas.com>
246
247	* QNX fixes (Mike Gorchak)
248
249	* Add quad support.
250
251	* FIFO checks (Dr. Werner Fink)
252
253	* Linux ELF fixes (Dr. Werner Fink)
254
255	* Magic format checks (Dr. Werner Fink)
256
257	* Magic format function improvent (Karl Chen)
258
2592006-05-03 11:11 Christos Zoulas <christos@zoulas.com>
260
261	* Pick up some elf changes and some constant fixes from SUSE
262
263	* Identify gnu tar vs. posix tar
264
265	* When keep going, don't print spurious newlines (Radek Vok�l)
266
2672006-04-01 12:02 Christos Zoulas <christos@zoulas.com>
268
269	* Use calloc instead of malloc (Mike Frysinger)
270
271	* Fix configure script to detect wctypes.h (Mike Frysinger)
272
2732006-03-02 16:06 Christos Zoulas <christos@zoulas.com>
274
275	* Print empty if the file is (Mike Frysinger)
276
277	* Don't try to read past the end of the buffer (Mike Frysinger)
278
279	* Sort magic entries by strength [experimental]
280
2812005-11-29 13:26 Christos Zoulas <christos@zoulas.com>
282
283	* Use iswprint() to convert the output string.
284	    (Bastien Nocera)
285
2862005-10-31 8:54 Christos Zoulas <christos@zoulas.com>
287
288	* Fix regression where the core info was not completely processed
289	    (Radek Vok�l)
290
2912005-10-20 11:15 Christos Zoulas <christos@zoulas.com>
292
293	* Middle Endian magic (Diomidis Spinellis)
294
2952005-10-17 11:15 Christos Zoulas <christos@zoulas.com>
296
297	* Open with O_BINARY for CYGWIN (Corinna Vinschen)
298
299	* Don't close stdin (Arkadiusz Miskiewicz)
300
301	* Look for note sections in non executables.
302
3032005-09-20 13:33 Christos Zoulas <christos@zoulas.com>
304
305	* Don't print SVR4 Style in core files multiple times
306	    (Radek Vok�l)
307
3082005-08-27 04:09 Christos Zoulas <christos@zoulas.com>
309
310	* Cygwin changes Corinna Vinschen
311
3122005-08-18 09:53 Christos Zoulas <christos@zoulas.com>
313
314	* Remove erroreous mention of /etc/magic in the file man page
315	  This is gentoo bug 101639. (Mike Frysinger)
316
317	* Cross-compile support and detection (Mike Frysinger)
318
3192005-08-12 10:17 Christos Zoulas <christos@zoulas.com>
320
321	* Add -h flag and dereference symlinks if POSIXLY_CORRECT
322	  is set.
323
3242005-07-29 13:57 Christos Zoulas <christos@zoulas.com>
325
326	* Avoid search and regex buffer overflows (Kelledin)
327
3282005-07-12 11:48 Christos Zoulas <christos@zoulas.com>
329
330	* Provide stub implementations for {v,}nsprintf() for older
331	  OS's that don't have them.
332	* Change mbstate_t autoconf detection macro from AC_MBSTATE_T
333	  to AC_TYPE_MBSTATE_T.
334
3352005-06-25 11:48 Christos Zoulas <christos@zoulas.com>
336
337	* Dynamically allocate the string buffers and make the
338	  default read size 256K.
339
3402005-06-01 00:00 Joerg Sonnenberger <joerg@britannica.bec.de>
341
342	* Dragonfly ELF note support
343
3442005-03-14 00:00 Giuliano Bertoletti <gb@symbolic.it>
345
346	* Avoid NULL pointer dereference in time conversion.
347
3482005-03-06 00:00  Joerg Walter <jwalt@mail.garni.ch>
349
350	* Add indirect magic offset support, and search mode.
351
3522005-01-12 00:00  Stepan Kasal  <kasal@ucw.cz>
353
354        * src/ascmagic.c (file_ascmagic): Fix three bugs about text files:
355          If a CRLF text file happens to have CR at offset HOWMANY - 1
356          (currently 0xffff), it should not be counted as CR line
357          terminator.
358          If a line has length exactly MAXLINELEN, it should not yet be
359          treated as a ``very long line'', as MAXLINELEN is ``longest sane
360          line length''.
361          With CRLF, the line length was not computed correctly, and even
362          lines of length MAXLINELEN - 1 were treated as ``very long''.
363
3642004-12-07 14:15  Christos Zoulas  <christos@zoulas.com>
365
366	* bzip2 needs a lot of input buffer space on some files
367	  before it can begin uncompressing. This makes file -z
368	  fail on some bz2 files. Fix it by giving it a copy of
369	  the file descriptor to read as much as it wants if we
370	  have access to it. <christos@zoulas.com>
371
3722004-11-24 12:39  Christos Zoulas  <christos@zoulas.com>
373
374	* Stack smash fix, and ELF more conservative reading.
375	  Jakub Bogusz <qboosh@pld-linux.org>
376
3772004-11-20 18:50  Christos Zoulas  <christos@zoulas.com>
378
379	* New FreeBSD version parsing code:
380	  Jon Noack <noackjr@alumni.rice.edu>
381
382	* Hackish support for ucs16 strings <christos@zoulas.com>
383
3842004-11-13 03:07  Christos Zoulas  <christos@zoulas.com>
385
386	* print the file name and line number in syntax errors.
387
3882004 10-12 10:50  Christos Zoulas  <christos@zoulas.com>
389
390	* Fix stack overwriting on 0 length strings: Tim Waugh
391	    <twaugh@redhat.com> Ned Ludd <solar@gentoo.org>
392
3932004-09-27 11:30  Christos Zoulas  <christos@zoulas.com>
394
395	* Remove 3rd and 4th copyright clause; approved by Ian Darwin.
396
397	* Fix small memory leaks; caught by: Tamas Sarlos
398	    <stamas@csillag.ilab.sztaki.hu>
399
4002004-07-24 16:33  Christos Zoulas  <christos@zoulas.com>
401
402	* magic.mime update Danny Milosavljevic <danny.milo@gmx.net>
403
404	* FreeBSD version update Oliver Eikemeier <eikemeier@fillmore-labs.com>
405
406	* utime/utimes detection Ian Lance Taylor <ian@wasabisystems.com>
407
408  	* errors reading elf magic Jakub Bogusz <qboosh@pld-linux.org>
409
4102004-04-12 10:55  Christos Zoulas  <christos@zoulas.com>
411
412	* make sure that magic formats match magic types during compilation
413
414	* fix broken sgi magic file
415
4162004-04-06 20:36  Christos Zoulas  <christos@zoulas.com>
417
418	* detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com>
419
420	* magic fixes
421
4222004-03-22 15:25  Christos Zoulas  <christos@zoulas.com>
423
424	* Lots of mime fixes
425	  (Joerg Ostertag) <ostertag@rechengilde.de>
426
427	* FreeBSD ELF version handling
428	  (Edwin Groothuis) <edwin@mavetju.org>
429
430	* correct cleanup in all cases; don't just close the file.
431	  (Christos Zoulas) <christos@zoulas.com>
432
433	* add gettext message catalogue support
434	  (Michael Piefel) <piefel@debian.org>
435
436	* better printout for unreadable files
437	  (Michael Piefel) <piefel@debian.org>
438
439	* compensate for missing MAXPATHLEN
440	  (Michael Piefel) <piefel@debian.org>
441
442	* add wide character string length computation
443	  (Michael Piefel) <piefel@debian.org>
444
445	* Avoid infinite loops caused by bad elf alignments
446	  or name and description note sizes. Reported by
447	  (Mikael Magnusson) <mmikael@comhem.se>
448
4492004-03-09 13:55  Christos Zoulas  <christos@zoulas.com>
450
451	* Fix possible memory leak on error and add missing regfree
452	  (Dmitry V. Levin) <ldv@altlinux.org>
453
4542003-12-23 12:12  Christos Zoulas  <christos@zoulas.com>
455
456	* fix -k flag (Maciej W. Rozycki)
457
4582003-11-18 14:10  Christos Zoulas  <christos@zoulas.com>
459
460	* Try to give us much info as possible on corrupt elf files.
461	  (Willy Tarreau) <willy@w.ods.org>
462	* Updated python bindings (Brett Funderburg)
463	   <brettf@deepfile.com>
464
4652003-11-11 15:03  Christos Zoulas  <christos@zoulas.com>
466
467	* Include file.h first, because it includes config.h
468	  breaks largefile test macros otherwise.
469	  (Paul Eggert <eggert@CS.UCLA.EDU> via
470	   Lars Hecking <lhecking@nmrc.ie>)
471
4722003-10-14 21:39  Christos Zoulas  <christos@zoulas.com>
473
474	* Python bindings (Brett Funderburg) <brettf@deepfile.com>
475	* Don't lookup past the end of the buffer
476	  (Chad Hanson) <chanson@tcs-sec.com>
477	* Add MAGIC_ERROR and api on magic_errno()
478
4792003-10-08 12:40  Christos Zoulas  <christos@zoulas.com>
480
481	* handle error conditions from compile as fatal
482	  (Antti Kantee) <pooka@netbsd.org>
483	* handle magic filename parsing sanely
484	* more magic fixes.
485	* fix a memory leak (Illes Marton) <illes.marton@balabit.hu>
486	* describe magic file handling
487	  (Bryan Henderson) <bryanh@giraffe-data.com>
488
4892003-09-12 15:09  Christos Zoulas  <christos@zoulas.com>
490
491	* update magic files.
492	* remove largefile support from file.h; it breaks things on most OS's
493
4942003-08-10 10:25  Christos Zoulas  <christos@zoulas.com>
495
496	* fix unmapping'ing of mmaped files.
497
4982003-07-10 12:03  Christos Zoulas  <christos@zoulas.com>
499
500	* don't exit with -1 on error; always exit 1 (Marty Leisner)
501	* restore utimes code.
502
5032003-06-10 17:03  Christos Zoulas  <christos@zoulas.com>
504
505	* make sure we don't access uninitialized memory.
506	* pass lint
507	* #ifdef __cplusplus in magic.h
508
5092003-05-25 19:23  Christos Zoulas  <christos@zoulas.com>
510
511	* rename cvs magic file to revision to deal with
512	  case insensitive filesystems.
513
5142003-05-23 17:03  Christos Zoulas  <christos@zoulas.com>
515
516	* documentation fixes from Michael Piefel <piefel@debian.org>
517	* magic fixes (various)
518	* revert basename magic in .mgc name determination
519	* buffer protection in uncompress,
520	  signness issues,
521	  close files
522	  Maciej W. Rozycki <macro@ds2.pg.gda.pl
523
5242003-04-21 20:12  Christos Zoulas  <christos@zoulas.com>
525
526	* fix zsh magic
527
5282003-04-04 16:59  Christos Zoulas  <christos@zoulas.com>
529
530	* fix operand sort order in string.
531
5322003-04-02 17:30  Christos Zoulas  <christos@zoulas.com>
533
534	* cleanup namespace in magic.h
535
5362003-04-02 13:50  Christos Zoulas  <christos@zoulas.com>
537
538	* Magic additions (Alex Ott)
539	* Fix bug that broke VPATH compilation (Peter Breitenlohner)
540
5412003-03-28 16:03  Christos Zoulas  <christos@zoulas.com>
542
543	* remove packed attribute from magic struct.
544	* make the magic struct properly aligned.
545	* bump version number of compiled files to 2.
546
5472003-03-27 13:10  Christos Zoulas  <christos@zoulas.com>
548
549	* separate tar detection and run it before softmagic.
550	* fix reversed symlink test.
551	* fix version printing.
552	* make separator a string instead of a char.
553	* update manual page and sort options.
554
5552003-03-26 11:00  Christos Zoulas  <christos@zoulas.com>
556
557	* Pass lint
558	* make NULL in magic_file mean stdin
559	* Fix "-" argument to file to pass NULL to magic_file
560	* avoid pointer casts by using memcpy
561	* rename magic_buf -> magic_buffer
562	* keep only the first error
563	* manual page: new sentence, new line
564	* fix typo in api function (magic_buf -> magic_buffer)
565