ChangeLog 14 KB

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