ChangeLog revision 192350
1192350Sdelphij2009-05-06 10:25 Christos Zoulas <christos@zoulas.com> 2192350Sdelphij 3192350Sdelphij * Avoid null dereference in cdf code (Drew Yao) 4192350Sdelphij 5192350Sdelphij * More cdf bounds checks and overflow checks 6192350Sdelphij 7192350Sdelphij2009-05-01 18:37 Christos Zoulas <christos@zoulas.com> 8192350Sdelphij 9192350Sdelphij * Buffer overflow fixes from Drew Yao 10192350Sdelphij 11192350Sdelphij2009-04-30 17:10 Christos Zoulas <christos@zoulas.com> 12192350Sdelphij 13192350Sdelphij * Fix more cdf lossage. All the documents I have 14192350Sdelphij right now print the correct information. 15192350Sdelphij 16192350Sdelphij2009-03-27 18:43 Christos Zoulas <christos@zoulas.com> 17192350Sdelphij 18192350Sdelphij * don't print \012- separators in the same magic entry 19192350Sdelphij if it consists of multiple magic printing lines. 20192350Sdelphij 21192350Sdelphij2009-03-23 10:20 Christos Zoulas <christos@zoulas.com> 22192350Sdelphij 23192350Sdelphij * Avoid file descriptor leak in compress code from 24192350Sdelphij (Daniel Novotny) 25192350Sdelphij 26192350Sdelphij2009-03-18 16:50 Christos Zoulas <christos@zoulas.com> 27192350Sdelphij 28192350Sdelphij * Allow escaping of relation characters, so that we can say \^[A-Z] 29192350Sdelphij and the ^ is not eaten as a relation char. 30192350Sdelphij 31192350Sdelphij * Fix troff and fortran to their previous glory using 32192350Sdelphij regex. This was broken since their removel from ascmagic. 33192350Sdelphij 34192350Sdelphij2009-03-10 16:50 Christos Zoulas <christos@zoulas.com> 35192350Sdelphij 36192350Sdelphij * don't use strlen in strndup() (Toby Peterson) 37192350Sdelphij 38192350Sdelphij2009-03-10 7:45 Christos Zoulas <christos@zoulas.com> 39192350Sdelphij 40192350Sdelphij * avoid c99 syntax. 41192350Sdelphij 42192350Sdelphij2009-02-23 15:45 Christos Zoulas <christos@zoulas.com> 43192350Sdelphij 44192350Sdelphij * make the cdf code use the buffer first if available, 45192350Sdelphij and then the fd code. 46192350Sdelphij 47192350Sdelphij2009-02-13 13:45 Christos Zoulas <christos@zoulas.com> 48192350Sdelphij 49192350Sdelphij * look for struct option to determine if getopt.h is usable for IRIX. 50192350Sdelphij 51192350Sdelphij * sanitize cdf document strings 52192350Sdelphij 53192350Sdelphij2009-02-04 13:25 Christos Zoulas <christos@zoulas.com> 54192350Sdelphij 55192350Sdelphij * fix OS/2 warnings. 56192350Sdelphij 57191771Sobrien2008-12-12 15:50 Christos Zoulas <christos@zoulas.com> 58191771Sobrien 59191771Sobrien * fix initial offset calculation for non 4K sector files 60191771Sobrien 61191771Sobrien * add loop limits to avoid DoS attacks by constructing 62191771Sobrien looping sector references. 63191771Sobrien 64191771Sobrien2008-12-03 13:05 Christos Zoulas <christos@zoulas.com> 65191771Sobrien 66191771Sobrien * fix memory botches on cdf file parsing. 67191771Sobrien 68191771Sobrien * exit with non-zero value for any error, not just for the last 69191771Sobrien file processed. 70191771Sobrien 71191771Sobrien2008-11-09 20:42 Charles Longeau <chl@tuxfamily.org> 72191771Sobrien 73191771Sobrien * Replace all str{cpy,cat} functions with strl{cpy,cat} 74191771Sobrien * Ensure that strl{cpy,cat} are included in libmagic, 75191771Sobrien as needed. 76191771Sobrien 77191771Sobrien2008-11-06 18:18 Christos Zoulas <christos@zoulas.com> 78191771Sobrien 79191771Sobrien * Handle ID3 format files. 80191771Sobrien 81191771Sobrien2008-11-06 23:00 Reuben Thomas <rrt@sc3d.org> 82191771Sobrien 83191771Sobrien * Fix --mime, --mime-type and --mime-encoding under new scheme. 84191771Sobrien 85191771Sobrien * Rename "ascii" to "text" and add "encoding" test. 86191771Sobrien 87191771Sobrien * Return a precise ("utf-16le" or "utf-16be") MIME charset for 88191771Sobrien UTF-16. 89191771Sobrien 90191771Sobrien * Fix error in comment caused by automatic indentation adding 91191771Sobrien words! 92191771Sobrien 93191771Sobrien2008-11-06 10:35 Christos Zoulas <christos@astron.com> 94191771Sobrien 95191771Sobrien * use memchr instead of strchr because the string 96191771Sobrien might not be NUL terminated (Scott MacVicar) 97191771Sobrien 98191771Sobrien2008-11-03 07:31 Reuben Thomas <rrt@sc3d.org> 99191771Sobrien 100191771Sobrien * Fix a printf with a non-literal format string. 101191771Sobrien 102191771Sobrien * Fix formatting and punctuation of help for "--apple". 103191771Sobrien 104191771Sobrien2008-10-30 11:00 Reuben Thomas <rrt@sc3d.org> 105191771Sobrien 106191771Sobrien * Correct words counts in comments of struct magic. 107191771Sobrien 108191771Sobrien * Fix handle_annotation to allow both Apple and MIME types to be 109191771Sobrien printed, and to return correct code if MIME type is 110191771Sobrien printed (1, not 0) or if there's an error (-1 not 1). 111191771Sobrien 112191771Sobrien * Fix output of charset for MIME type (precede with semi-colon; 113191771Sobrien fixes Debian bug #501460). 114191771Sobrien 115191771Sobrien * Fix potential attacks via conversion specifications in magic 116191771Sobrien strings. 117191771Sobrien 118191771Sobrien * Add a FIXME for Debian bug #488562 (magic files should be 119191771Sobrien read in a defined order, by sorting the names). 120191771Sobrien 121191771Sobrien2008-10-18 16:45 Christos Zoulas <christos@astron.com> 122191771Sobrien 123191771Sobrien * Added APPLE file creator/type 124191771Sobrien 125191771Sobrien2008-10-12 10:20 Christos Zoulas <christos@astron.com> 126191771Sobrien 127191771Sobrien * Added CDF parsing 128191771Sobrien 129191771Sobrien2008-10-09 16:40 Christos Zoulas <christos@astron.com> 130191771Sobrien 131191771Sobrien * filesystem and msdos patches (Joerg Jenderek) 132191771Sobrien 133191771Sobrien2008-10-09 13:20 Christos Zoulas <christos@astron.com> 134191771Sobrien 135191771Sobrien * correct --exclude documentation issues: remove troff and fortran 136191771Sobrien and rename "token" to "tokens". (Randy McMurchy) 137191771Sobrien 138191771Sobrien2008-10-01 10:30 Christos Zoulas <christos@astron.com> 139191771Sobrien 140191771Sobrien * Read ~/.magic in addition to the default magic file not instead 141191771Sobrien of, as documented in the man page. 142191771Sobrien 143191771Sobrien2008-09-10 21:30 Reuben Thomas <rrt@sc3d.org> 144191771Sobrien 145191771Sobrien * Comment out graphviz patterns, as they match too many files. 146191771Sobrien 147186691Sobrien2008-08-30 12:54 Christos Zoulas <christos@astron.com> 148175296Sobrien 149186691Sobrien * Don't eat trailing \n in magic enties. 150186691Sobrien 151186691Sobrien * Cast defines to allow compilation using a c++ compiler. 152186691Sobrien 153191771Sobrien2008-08-25 23:56 Reuben Thomas <rrt@sc3d.org> 154191771Sobrien 155191771Sobrien * Add text/x-lua MIME type for Lua scripts. 156191771Sobrien 157191771Sobrien * Escape { in regex in graphviz patterns. 158191771Sobrien 159186691Sobrien2008-07-26 00:59 Reuben Thomas <rrt@sc3d.org> 160186691Sobrien 161186691Sobrien * Add MIME types for special files. 162186691Sobrien 163186691Sobrien * Use access to give more accurate information for files that 164186691Sobrien can't be opened. 165186691Sobrien 166186691Sobrien * Add a TODO list. 167186691Sobrien 168186691Sobrien2008-07-02 11:15 Christos Zoulas <christos@astron.com> 169186691Sobrien 170186691Sobrien * add !:strength op to adjust magic strength (experimental) 171186691Sobrien 172186691Sobrien2008-06-16 21:41 Reuben Thomas <rrt@sc3d.org> 173186691Sobrien 174186691Sobrien * Fix automake error in configure.ac. 175186691Sobrien 176186691Sobrien * Add MIME type for Psion Sketch files. 177186691Sobrien 178186691Sobrien2008-06-05 08:59 Christos Zoulas <christos@astron.com> 179186691Sobrien 180186691Sobrien * Don't print warnings about bad namesize in stripped 181186691Sobrien binaries with PT_NOTE is still there, and the actual 182186691Sobrien note is gone (Jakub Jelinek) 183186691Sobrien 184186691Sobrien2008-05-28 15:12 Robert Byrnes <byrnes@wildpumpkin.net> 185186691Sobrien 186186691Sobrien * magic/Magdir/elf: 187186691Sobrien Note invalid byte order for little-endian SPARC32PLUS. 188186691Sobrien Add SPARC V9 vendor extensions and memory model. 189186691Sobrien 190186691Sobrien * src/elfclass.h: 191186691Sobrien Pass target machine to doshn (for Solaris hardware capabilities). 192186691Sobrien 193186691Sobrien * src/readelf.c (doshn): 194186691Sobrien Add support for Solaris hardware/software capabilities. 195186691Sobrien 196186691Sobrien * src/readelf.h: 197186691Sobrien Ditto. 198186691Sobrien 199186691Sobrien * src/vasprintf.c (dispatch): 200186691Sobrien Add support for ll modifier. 201186691Sobrien 202186691Sobrien2008-05-16 10:25 Christos Zoulas <christos@astron.com> 203186691Sobrien 204186691Sobrien * Fix compiler warnings. 205186691Sobrien 206186691Sobrien * remove stray printf, and fix a vprintf bug. (Martin Dorey) 207186691Sobrien 208186691Sobrien2008-05-06 00:13 Robert Byrnes <byrnes@wildpumpkin.net> 209186691Sobrien 210191771Sobrien * src/Makefile.am: 211186691Sobrien Ensure that getopt_long and [v]asprintf are included in libmagic, 212186691Sobrien as needed. 213186691Sobrien 214186691Sobrien Remove unnecessary EXTRA_DIST. 215186691Sobrien 216191771Sobrien * src/Makefile.in: 217186691Sobrien Rerun automake. 218186691Sobrien 219191771Sobrien * src/vasprintf.c (dispatch): 220186691Sobrien Fix variable precision bug: be sure to step past '*'. 221186691Sobrien 222191771Sobrien * src/vasprintf.c (core): 223186691Sobrien Remove unreachable code. 224186691Sobrien 225191771Sobrien * src/apprentice.c (set_test_type): 226186691Sobrien Add cast to avoid compiler warning. 227186691Sobrien 228186691Sobrien2008-04-22 23:45 Christos Zoulas <christos@astron.com> 229186691Sobrien 230186691Sobrien * Add magic submission guidelines (Abel Cheung) 231186691Sobrien 232186691Sobrien * split msdos and windows magic (Abel Cheung) 233186691Sobrien 234186691Sobrien2008-04-04 11:00 Christos Zoulas <christos@astron.com> 235186691Sobrien 236191771Sobrien * >= <= is not supported, so fix the magic and warn about it. 237186691Sobrien reported by: Thien-Thi Nguyen <ttn@gnuvola.org> 238186691Sobrien 239186691Sobrien2008-03-27 16:16 Robert Byrnes <byrnes@wildpumpkin.net> 240186691Sobrien 241191771Sobrien * src/readelf.c (donote): 242186691Sobrien ELF core file command name/line bug fixes and enhancements: 243186691Sobrien 244186691Sobrien Try larger offsets first to avoid false matches 245186691Sobrien from earlier data that happen to look like strings; 246186691Sobrien this primarily affected SunOS 5.x 32-bit Intel core files. 247186691Sobrien 248186691Sobrien Add support for command line (instead of just short name) 249186691Sobrien for SunOS 5.x. 250186691Sobrien 251186691Sobrien Add information about NT_PSINFO for SunOS 5.x. 252186691Sobrien 253186691Sobrien Only trim whitespace from end of command line. 254186691Sobrien 255186691Sobrien2007-02-11 01:36 Reuben Thomas <rrt@sc3d.org> 256186691Sobrien 257186691Sobrien * Change strength of ! from MULT to 0, as it matches almost 258186691Sobrien anything (Reuben Thomas) 259186691Sobrien 260186691Sobrien * Debian fixes (Reuben Thomas) 261186691Sobrien 262186691Sobrien2007-02-11 00:17 Reuben Thomas <rrt@sc3d.org> 263186691Sobrien 264186691Sobrien * Clarify UTF-8 BOM message (Reuben Thomas) 265186691Sobrien 266186691Sobrien * Add HTML comment to token list in names.h 267191771Sobrien 268186691Sobrien2007-02-04 15:50 Christos Zoulas <christos@astron.com> 269186691Sobrien 270186691Sobrien * Debian fixes (Reuben Thomas) 271186691Sobrien 272186691Sobrien2007-02-04 11:31 Christos Zoulas <christos@astron.com> 273186691Sobrien 274186691Sobrien * !:mime annotations in magic files (Reuben Thomas) 275186691Sobrien 276186691Sobrien2007-01-29 15:35 Christos Zoulas <christos@astron.com> 277186691Sobrien 278186691Sobrien * zero out utime/utimes structs (Gavin Atkinson) 279186691Sobrien 280186691Sobrien2007-01-26 13:45 Christos Zoulas <christos@astron.com> 281186691Sobrien 282186691Sobrien * reduce writable data from Diego "Flameeyes" Petten 283186691Sobrien 284186691Sobrien2007-12-28 15:06 Christos Zoulas <christos@astron.com> 285186691Sobrien 286175296Sobrien * strtof detection 287175296Sobrien 288175296Sobrien * remove bogus regex magic that could cause a DoS 289175296Sobrien 290175296Sobrien * better mismatch version message 291175296Sobrien 292186691Sobrien2007-12-27 11:35 Christos Zoulas <christos@astron.com> 293175296Sobrien 294175296Sobrien * bring back some fixes from OpenBSD 295175296Sobrien 296175296Sobrien * treat ELF dynamic objects as executables 297175296Sobrien 298175296Sobrien * fix gcc warnings 299175296Sobrien 300186691Sobrien2007-12-01 19:55 Christos Zoulas <christos@astron.com> 301175296Sobrien 302175296Sobrien * make sure we have zlib.h and libz to compile the builtin 303175296Sobrien decompress code 304175296Sobrien 305186691Sobrien2007-10-28 20:48 Christos Zoulas <christos@astron.com> 306175296Sobrien 307191771Sobrien * float and double magic support (Behan Webster) 308175296Sobrien 309186691Sobrien2007-10-28 20:48 Christos Zoulas <christos@astron.com> 310175296Sobrien 311175296Sobrien * Convert fortran to a soft test (Reuben Thomas) 312175296Sobrien 313186691Sobrien2007-10-23 5:25 Christos Zoulas <christos@astron.com> 314175296Sobrien 315175296Sobrien * Add --with-filename, and --no-filename (Reuben Thomas) 316175296Sobrien 317186691Sobrien2007-10-23 3:59 Christos Zoulas <christos@astron.com> 318175296Sobrien 319175296Sobrien * Rest of the mime split (Reuben Thomas) 320175296Sobrien 321175296Sobrien * Make usage message generated from the flags so that 322175296Sobrien they stay consistent (Reuben Thomas) 323175296Sobrien 324186691Sobrien2007-10-20 3:06 Christos Zoulas <christos@astron.com> 325175296Sobrien 326175296Sobrien * typo in comment, missing ifdef QUICK, remove unneeded code 327175296Sobrien (Charles Longeau) 328175296Sobrien 329186691Sobrien2007-10-17 3:33 Christos Zoulas <christos@astron.com> 330175296Sobrien 331175296Sobrien * Fix problem printing -\012 in some entries 332175296Sobrien 333175296Sobrien * Separate magic type and encoding flags (Reuben Thomas) 334175296Sobrien 335186691Sobrien2007-10-09 3:55 Christos Zoulas <christos@astron.com> 336175296Sobrien 337175296Sobrien * configure fix for int64 and strndup (Reuben Thomas) 338175296Sobrien 339186691Sobrien2007-09-26 4:45 Christos Zoulas <christos@astron.com> 340175296Sobrien 341175296Sobrien * Add magic_descriptor() function. 342175296Sobrien 343175296Sobrien * Fix regression in elf reading code where the core name was 344175296Sobrien not being printed. 345175296Sobrien 346175296Sobrien * Don't convert NUL's to spaces in {l,b}estring16 (Daniel Dawson) 347175296Sobrien 348186691Sobrien2007-08-19 6:30 Christos Zoulas <christos@astron.com> 349175296Sobrien 350175296Sobrien * Make mime format consistent so that it can 351175296Sobrien be easily parsed: 352175296Sobrien mimetype [charset=character-set] [encoding=encoding-mime-type] 353175296Sobrien 354191771Sobrien Remove spurious extra text from some MIME type printouts 355175296Sobrien (mostly in is_tar). 356175296Sobrien 357175296Sobrien Fix one case where -i produced nothing at all (for a 1-byte file, 358175296Sobrien which is now classed as application/octet-stream). 359175296Sobrien 360175296Sobrien Remove 7/8bit classifications, since they were arbitrary 361175296Sobrien and not based on the file data. 362175296Sobrien 363175296Sobrien This work was done by Reuben Thomas 364175296Sobrien 365186691Sobrien2007-05-24 10:00 Christos Zoulas <christos@astron.com> 366169962Sobrien 367169962Sobrien * Fix another integer overflow (Colin Percival) 368169962Sobrien 369186691Sobrien2007-03-26 13:58 Christos Zoulas <christos@astron.com> 370169962Sobrien 371169962Sobrien * make sure that all of struct magic_set is initialized appropriately 372169962Sobrien (Brett) 373169962Sobrien 374186691Sobrien2007-03-25 17:44 Christos Zoulas <christos@astron.com> 375169962Sobrien 376169962Sobrien * reset left bytes in the buffer (Dmitry V. Levin) 377169962Sobrien 378169962Sobrien * compilation failed with COMPILE_ONLY and ENABLE_CONDITIONALS 379169962Sobrien (Peter Avalos) 380169962Sobrien 381186691Sobrien2007-03-15 10:51 Christos Zoulas <christos@astron.com> 382169962Sobrien 383169962Sobrien * fix fortran and nroff reversed tests (Dmitry V. Levin) 384191771Sobrien 385169962Sobrien * fix exclude option (Dmitry V. Levin) 386169962Sobrien 387186691Sobrien2007-02-08 17:30 Christos Zoulas <christos@astron.com> 388169962Sobrien 389169962Sobrien * fix integer underflow in file_printf which can lead to 390169962Sobrien to exploitable heap overflow (Jean-Sebastien Guay-Lero) 391169962Sobrien 392186691Sobrien2007-02-05 11:35 Christos Zoulas <christos@astron.com> 393169962Sobrien 394169962Sobrien * make socket/pipe reading more robust 395169962Sobrien 396186691Sobrien2007-01-25 16:01 Christos Zoulas <christos@astron.com> 397169962Sobrien 398169962Sobrien * Centralize all the tests in file_buffer. 399169962Sobrien 400169962Sobrien * Add exclude flag. 401169962Sobrien 402169962Sobrien2007-01-18 05:29 Anon Ymous <do@not.spam.me> 403191771Sobrien 404169962Sobrien * Move the "type" detection code from parse() into its own table 405169962Sobrien driven routine. This avoids maintaining multiple lists in 406169962Sobrien file.h. 407169962Sobrien 408169962Sobrien * Add an optional conditional field (ust before the type field). 409169962Sobrien This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is 410169962Sobrien likely to go away. 411191771Sobrien 412169962Sobrien2007-01-16 23:24 Anon Ymous <do@not.spam.me> 413169962Sobrien 414169962Sobrien * Fix an initialization bug in check_mem(). 415169962Sobrien 416169962Sobrien2007-01-16 14:58 Anon Ymous <do@not.spam.me> 417169962Sobrien 418169962Sobrien * Add a "default" type to print a message if nothing previously 419169962Sobrien matched at that level or since the last default at that 420169962Sobrien level. This is useful for setting up switch-like statements. 421169962Sobrien It can also be used to do if/else constructions without a 422169962Sobrien redundant second test. 423169962Sobrien 424169962Sobrien * Fix the "x" special case test so that one can test for that 425169962Sobrien string with "=x". 426169962Sobrien 427169962Sobrien * Allow "search" to search the entire buffer if the "/N" 428169962Sobrien search count is missing. 429169962Sobrien 430169962Sobrien * Make "regex" work! It now starts its search at the 431169962Sobrien specified offset and takes an (optional) "/N" line count to 432169962Sobrien specify the search range; otherwise it searches to the end 433169962Sobrien of the file. The match is now grabbed correctly for format 434169962Sobrien strings and the offset set to the end of the match. 435169962Sobrien 436169962Sobrien * Add a "/s" flag to "regex" and "search" to set the offset to 437169962Sobrien the start of the match. By default the offset is set to the 438169962Sobrien end of the match, as it is with other tests. This is mostly 439169962Sobrien useful for "regex". 440169962Sobrien 441169962Sobrien * Make "search", "string" and "pstring" use the same 442169962Sobrien file_strncmp() routine so that they support the same flags; 443169962Sobrien "bestring16" and "lestring16" call the same routine, but 444169962Sobrien with flags = 0. Also add a "/C" flag (in analogy to "/c") 445169962Sobrien to ignore the case on uppercase (lowercase) characters in 446169962Sobrien the test string. 447169962Sobrien 448169962Sobrien * Strict adherence to C style string escapes. A warnings are 449169962Sobrien printed when compiling. Note: previously "\a" was 450169962Sobrien incorrectly translated to 'a' instead of an <alert> (i.e., 451169962Sobrien BELL, typically 0x07). 452169962Sobrien 453169962Sobrien * Make this compile with "-Wall -Wextra" and all the warning 454169962Sobrien flags used with WARNS=4 in the NetBSD source. Also make it 455169962Sobrien pass lint. 456169962Sobrien 457169962Sobrien * Many "cleanups" and hopefully not too many new bugs! 458169962Sobrien 459169962Sobrien2007-01-16 14:56 Anon Ymous <do@not.spam.me> 460169962Sobrien 461169962Sobrien * make several more files compile with gcc warnings 462169962Sobrien on and also make them pass lint. 463169962Sobrien 464169962Sobrien2007-01-16 14:54 Anon Ymous <do@not.spam.me> 465169962Sobrien 466169962Sobrien * fix a puts()/putc() usage goof in file.c 467169962Sobrien 468169962Sobrien * make file.c compile with gcc warnings and pass lint 469169962Sobrien 470186691Sobrien2006-12-11 16:49 Christos Zoulas <christos@astron.com> 471169942Sobrien 472169942Sobrien * fix byteswapping issue 473169942Sobrien 474169942Sobrien * report the number of bytes we tried to 475169942Sobrien allocate when allocation fails 476169942Sobrien 477169942Sobrien * add a few missed cases in the strength routine 478169942Sobrien 479186691Sobrien2006-12-08 16:32 Christos Zoulas <christos@astron.com> 480169942Sobrien 481169942Sobrien * store and print the line number of the magic 482191771Sobrien entry for debugging. 483169942Sobrien 484169942Sobrien * if the magic entry did not print anything, 485169942Sobrien don't treat it as a match 486169942Sobrien 487169942Sobrien * change the magic strength algorithm to take 488169942Sobrien into account the relationship op. 489169942Sobrien 490169942Sobrien * fix a bug in search where we could accidentally 491169942Sobrien return a match. 492169942Sobrien 493169942Sobrien * propagate the error return from match to 494169942Sobrien file_softmagic. 495169942Sobrien 496186691Sobrien2006-11-25 13:35 Christos Zoulas <christos@astron.com> 497191771Sobrien 498169942Sobrien * Don't store the current offset in the magic 499169942Sobrien struct, because it needs to be restored and 500169942Sobrien it was not done properly all the time. Bug 501169942Sobrien found by: Arkadiusz Miskiewicz 502169942Sobrien 503169942Sobrien * Fix problem in the '\0' separator; and don't 504169942Sobrien print it as an additional separator; print 505169942Sobrien it as the only separator. 506169942Sobrien 507186691Sobrien2006-11-17 10:51 Christos Zoulas <christos@astron.com> 508169942Sobrien 509169942Sobrien * Added a -0 option to print a '\0' separator 510169942Sobrien Etienne Buira <etienne.buira@free.fr> 511169942Sobrien 512186691Sobrien2006-10-31 15:14 Christos Zoulas <christos@astron.com> 513169942Sobrien 514169942Sobrien * Check offset before copying (Mike Frysinger) 515169942Sobrien 516169942Sobrien * merge duplicated code 517169942Sobrien 518169942Sobrien * add quad date support 519169942Sobrien 520169942Sobrien * make sure that we nul terminate desc (Ryoji Kanai) 521169942Sobrien 522169942Sobrien * don't process elf notes multiple times 523169942Sobrien 524169942Sobrien * allow -z to report empty compressed files 525169942Sobrien 526169942Sobrien * use calloc to initialize the ascii buffers (Jos van den Oever) 527169942Sobrien 528186691Sobrien2006-06-08 11:11 Christos Zoulas <christos@astron.com> 529169942Sobrien 530169942Sobrien * QNX fixes (Mike Gorchak) 531169942Sobrien 532169942Sobrien * Add quad support. 533169942Sobrien 534169942Sobrien * FIFO checks (Dr. Werner Fink) 535169942Sobrien 536169942Sobrien * Linux ELF fixes (Dr. Werner Fink) 537169942Sobrien 538169942Sobrien * Magic format checks (Dr. Werner Fink) 539169942Sobrien 540169942Sobrien * Magic format function improvent (Karl Chen) 541169942Sobrien 542186691Sobrien2006-05-03 11:11 Christos Zoulas <christos@astron.com> 543169942Sobrien 544169942Sobrien * Pick up some elf changes and some constant fixes from SUSE 545169942Sobrien 546169942Sobrien * Identify gnu tar vs. posix tar 547169942Sobrien 548169942Sobrien * When keep going, don't print spurious newlines (Radek Vok�l) 549169942Sobrien 550186691Sobrien2006-04-01 12:02 Christos Zoulas <christos@astron.com> 551169942Sobrien 552169942Sobrien * Use calloc instead of malloc (Mike Frysinger) 553169942Sobrien 554169942Sobrien * Fix configure script to detect wctypes.h (Mike Frysinger) 555169942Sobrien 556186691Sobrien2006-03-02 16:06 Christos Zoulas <christos@astron.com> 557159764Sobrien 558159764Sobrien * Print empty if the file is (Mike Frysinger) 559159764Sobrien 560159764Sobrien * Don't try to read past the end of the buffer (Mike Frysinger) 561159764Sobrien 562159764Sobrien * Sort magic entries by strength [experimental] 563159764Sobrien 564186691Sobrien2005-11-29 13:26 Christos Zoulas <christos@astron.com> 565159764Sobrien 566159764Sobrien * Use iswprint() to convert the output string. 567159764Sobrien (Bastien Nocera) 568159764Sobrien 569186691Sobrien2005-10-31 8:54 Christos Zoulas <christos@astron.com> 570159764Sobrien 571159764Sobrien * Fix regression where the core info was not completely processed 572159764Sobrien (Radek Vok�l) 573159764Sobrien 574186691Sobrien2005-10-20 11:15 Christos Zoulas <christos@astron.com> 575159764Sobrien 576159764Sobrien * Middle Endian magic (Diomidis Spinellis) 577159764Sobrien 578186691Sobrien2005-10-17 11:15 Christos Zoulas <christos@astron.com> 579159764Sobrien 580159764Sobrien * Open with O_BINARY for CYGWIN (Corinna Vinschen) 581159764Sobrien 582159764Sobrien * Don't close stdin (Arkadiusz Miskiewicz) 583159764Sobrien 584159764Sobrien * Look for note sections in non executables. 585159764Sobrien 586186691Sobrien2005-09-20 13:33 Christos Zoulas <christos@astron.com> 587191771Sobrien 588159764Sobrien * Don't print SVR4 Style in core files multiple times 589159764Sobrien (Radek Vok�l) 590159764Sobrien 591186691Sobrien2005-08-27 04:09 Christos Zoulas <christos@astron.com> 592159764Sobrien 593159764Sobrien * Cygwin changes Corinna Vinschen 594159764Sobrien 595186691Sobrien2005-08-18 09:53 Christos Zoulas <christos@astron.com> 596159764Sobrien 597159764Sobrien * Remove erroreous mention of /etc/magic in the file man page 598191771Sobrien This is gentoo bug 101639. (Mike Frysinger) 599159764Sobrien 600191771Sobrien * Cross-compile support and detection (Mike Frysinger) 601159764Sobrien 602186691Sobrien2005-08-12 10:17 Christos Zoulas <christos@astron.com> 603159764Sobrien 604159764Sobrien * Add -h flag and dereference symlinks if POSIXLY_CORRECT 605159764Sobrien is set. 606159764Sobrien 607186691Sobrien2005-07-29 13:57 Christos Zoulas <christos@astron.com> 608159764Sobrien 609159764Sobrien * Avoid search and regex buffer overflows (Kelledin) 610159764Sobrien 611186691Sobrien2005-07-12 11:48 Christos Zoulas <christos@astron.com> 612159764Sobrien 613159764Sobrien * Provide stub implementations for {v,}nsprintf() for older 614159764Sobrien OS's that don't have them. 615159764Sobrien * Change mbstate_t autoconf detection macro from AC_MBSTATE_T 616159764Sobrien to AC_TYPE_MBSTATE_T. 617159764Sobrien 618186691Sobrien2005-06-25 11:48 Christos Zoulas <christos@astron.com> 619159764Sobrien 620159764Sobrien * Dynamically allocate the string buffers and make the 621159764Sobrien default read size 256K. 622159764Sobrien 623159764Sobrien2005-06-01 00:00 Joerg Sonnenberger <joerg@britannica.bec.de> 624159764Sobrien 625159764Sobrien * Dragonfly ELF note support 626159764Sobrien 627159764Sobrien2005-03-14 00:00 Giuliano Bertoletti <gb@symbolic.it> 628159764Sobrien 629159764Sobrien * Avoid NULL pointer dereference in time conversion. 630159764Sobrien 631159764Sobrien2005-03-06 00:00 Joerg Walter <jwalt@mail.garni.ch> 632191771Sobrien 633159764Sobrien * Add indirect magic offset support, and search mode. 634159764Sobrien 635159764Sobrien2005-01-12 00:00 Stepan Kasal <kasal@ucw.cz> 636159764Sobrien 637191771Sobrien * src/ascmagic.c (file_ascmagic): Fix three bugs about text files: 638191771Sobrien If a CRLF text file happens to have CR at offset HOWMANY - 1 639191771Sobrien (currently 0xffff), it should not be counted as CR line 640191771Sobrien terminator. 641191771Sobrien If a line has length exactly MAXLINELEN, it should not yet be 642191771Sobrien treated as a ``very long line'', as MAXLINELEN is ``longest sane 643191771Sobrien line length''. 644191771Sobrien With CRLF, the line length was not computed correctly, and even 645191771Sobrien lines of length MAXLINELEN - 1 were treated as ``very long''. 646159764Sobrien 647186691Sobrien2004-12-07 14:15 Christos Zoulas <christos@astron.com> 648159764Sobrien 649159764Sobrien * bzip2 needs a lot of input buffer space on some files 650159764Sobrien before it can begin uncompressing. This makes file -z 651159764Sobrien fail on some bz2 files. Fix it by giving it a copy of 652159764Sobrien the file descriptor to read as much as it wants if we 653186691Sobrien have access to it. <christos@astron.com> 654159764Sobrien 655186691Sobrien2004-11-24 12:39 Christos Zoulas <christos@astron.com> 656133359Sobrien 657139368Sobrien * Stack smash fix, and ELF more conservative reading. 658139368Sobrien Jakub Bogusz <qboosh@pld-linux.org> 659139368Sobrien 660186691Sobrien2004-11-20 18:50 Christos Zoulas <christos@astron.com> 661139368Sobrien 662139368Sobrien * New FreeBSD version parsing code: 663139368Sobrien Jon Noack <noackjr@alumni.rice.edu> 664139368Sobrien 665186691Sobrien * Hackish support for ucs16 strings <christos@astron.com> 666139368Sobrien 667186691Sobrien2004-11-13 03:07 Christos Zoulas <christos@astron.com> 668139368Sobrien 669139368Sobrien * print the file name and line number in syntax errors. 670139368Sobrien 671186691Sobrien2004 10-12 10:50 Christos Zoulas <christos@astron.com> 672139368Sobrien 673139368Sobrien * Fix stack overwriting on 0 length strings: Tim Waugh 674139368Sobrien <twaugh@redhat.com> Ned Ludd <solar@gentoo.org> 675139368Sobrien 676186691Sobrien2004-09-27 11:30 Christos Zoulas <christos@astron.com> 677139368Sobrien 678139368Sobrien * Remove 3rd and 4th copyright clause; approved by Ian Darwin. 679139368Sobrien 680191771Sobrien * Fix small memory leaks; caught by: Tamas Sarlos 681139368Sobrien <stamas@csillag.ilab.sztaki.hu> 682139368Sobrien 683186691Sobrien2004-07-24 16:33 Christos Zoulas <christos@astron.com> 684133359Sobrien 685191771Sobrien * magic.mime update Danny Milosavljevic <danny.milo@gmx.net> 686133359Sobrien 687133359Sobrien * FreeBSD version update Oliver Eikemeier <eikemeier@fillmore-labs.com> 688133359Sobrien 689133359Sobrien * utime/utimes detection Ian Lance Taylor <ian@wasabisystems.com> 690133359Sobrien 691133359Sobrien * errors reading elf magic Jakub Bogusz <qboosh@pld-linux.org> 692133359Sobrien 693186691Sobrien2004-04-12 10:55 Christos Zoulas <christos@astron.com> 694133359Sobrien 695133359Sobrien * make sure that magic formats match magic types during compilation 696133359Sobrien 697133359Sobrien * fix broken sgi magic file 698133359Sobrien 699186691Sobrien2004-04-06 20:36 Christos Zoulas <christos@astron.com> 700133359Sobrien 701133359Sobrien * detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com> 702133359Sobrien 703133359Sobrien * magic fixes 704133359Sobrien 705186691Sobrien2004-03-22 15:25 Christos Zoulas <christos@astron.com> 706133359Sobrien 707133359Sobrien * Lots of mime fixes 708133359Sobrien (Joerg Ostertag) <ostertag@rechengilde.de> 709133359Sobrien 710133359Sobrien * FreeBSD ELF version handling 711133359Sobrien (Edwin Groothuis) <edwin@mavetju.org> 712133359Sobrien 713133359Sobrien * correct cleanup in all cases; don't just close the file. 714186691Sobrien (Christos Zoulas) <christos@astron.com> 715133359Sobrien 716133359Sobrien * add gettext message catalogue support 717133359Sobrien (Michael Piefel) <piefel@debian.org> 718133359Sobrien 719133359Sobrien * better printout for unreadable files 720133359Sobrien (Michael Piefel) <piefel@debian.org> 721133359Sobrien 722133359Sobrien * compensate for missing MAXPATHLEN 723133359Sobrien (Michael Piefel) <piefel@debian.org> 724133359Sobrien 725133359Sobrien * add wide character string length computation 726133359Sobrien (Michael Piefel) <piefel@debian.org> 727133359Sobrien 728133359Sobrien * Avoid infinite loops caused by bad elf alignments 729133359Sobrien or name and description note sizes. Reported by 730133359Sobrien (Mikael Magnusson) <mmikael@comhem.se> 731133359Sobrien 732186691Sobrien2004-03-09 13:55 Christos Zoulas <christos@astron.com> 733133359Sobrien 734133359Sobrien * Fix possible memory leak on error and add missing regfree 735133359Sobrien (Dmitry V. Levin) <ldv@altlinux.org> 736133359Sobrien 737186691Sobrien2003-12-23 12:12 Christos Zoulas <christos@astron.com> 738133359Sobrien 739133359Sobrien * fix -k flag (Maciej W. Rozycki) 740133359Sobrien 741186691Sobrien2003-11-18 14:10 Christos Zoulas <christos@astron.com> 742133359Sobrien 743133359Sobrien * Try to give us much info as possible on corrupt elf files. 744133359Sobrien (Willy Tarreau) <willy@w.ods.org> 745133359Sobrien * Updated python bindings (Brett Funderburg) 746133359Sobrien <brettf@deepfile.com> 747133359Sobrien 748186691Sobrien2003-11-11 15:03 Christos Zoulas <christos@astron.com> 749133359Sobrien 750133359Sobrien * Include file.h first, because it includes config.h 751133359Sobrien breaks largefile test macros otherwise. 752133359Sobrien (Paul Eggert <eggert@CS.UCLA.EDU> via 753133359Sobrien Lars Hecking <lhecking@nmrc.ie>) 754133359Sobrien 755186691Sobrien2003-10-14 21:39 Christos Zoulas <christos@astron.com> 756133359Sobrien 757133359Sobrien * Python bindings (Brett Funderburg) <brettf@deepfile.com> 758133359Sobrien * Don't lookup past the end of the buffer 759133359Sobrien (Chad Hanson) <chanson@tcs-sec.com> 760133359Sobrien * Add MAGIC_ERROR and api on magic_errno() 761133359Sobrien 762186691Sobrien2003-10-08 12:40 Christos Zoulas <christos@astron.com> 763133359Sobrien 764133359Sobrien * handle error conditions from compile as fatal 765133359Sobrien (Antti Kantee) <pooka@netbsd.org> 766133359Sobrien * handle magic filename parsing sanely 767133359Sobrien * more magic fixes. 768133359Sobrien * fix a memory leak (Illes Marton) <illes.marton@balabit.hu> 769133359Sobrien * describe magic file handling 770133359Sobrien (Bryan Henderson) <bryanh@giraffe-data.com> 771133359Sobrien 772186691Sobrien2003-09-12 15:09 Christos Zoulas <christos@astron.com> 773133359Sobrien 774133359Sobrien * update magic files. 775133359Sobrien * remove largefile support from file.h; it breaks things on most OS's 776133359Sobrien 777186691Sobrien2003-08-10 10:25 Christos Zoulas <christos@astron.com> 778133359Sobrien 779133359Sobrien * fix unmapping'ing of mmaped files. 780133359Sobrien 781186691Sobrien2003-07-10 12:03 Christos Zoulas <christos@astron.com> 782133359Sobrien 783133359Sobrien * don't exit with -1 on error; always exit 1 (Marty Leisner) 784133359Sobrien * restore utimes code. 785133359Sobrien 786186691Sobrien2003-06-10 17:03 Christos Zoulas <christos@astron.com> 787133359Sobrien 788133359Sobrien * make sure we don't access uninitialized memory. 789133359Sobrien * pass lint 790133359Sobrien * #ifdef __cplusplus in magic.h 791133359Sobrien 792186691Sobrien2003-05-25 19:23 Christos Zoulas <christos@astron.com> 793133359Sobrien 794133359Sobrien * rename cvs magic file to revision to deal with 795133359Sobrien case insensitive filesystems. 796133359Sobrien 797186691Sobrien2003-05-23 17:03 Christos Zoulas <christos@astron.com> 798133359Sobrien 799133359Sobrien * documentation fixes from Michael Piefel <piefel@debian.org> 800133359Sobrien * magic fixes (various) 801133359Sobrien * revert basename magic in .mgc name determination 802133359Sobrien * buffer protection in uncompress, 803133359Sobrien signness issues, 804133359Sobrien close files 805133359Sobrien Maciej W. Rozycki <macro@ds2.pg.gda.pl 806133359Sobrien 807186691Sobrien2003-04-21 20:12 Christos Zoulas <christos@astron.com> 808133359Sobrien 809133359Sobrien * fix zsh magic 810133359Sobrien 811186691Sobrien2003-04-04 16:59 Christos Zoulas <christos@astron.com> 812133359Sobrien 813133359Sobrien * fix operand sort order in string. 814133359Sobrien 815186691Sobrien2003-04-02 17:30 Christos Zoulas <christos@astron.com> 816133359Sobrien 817133359Sobrien * cleanup namespace in magic.h 818133359Sobrien 819186691Sobrien2003-04-02 13:50 Christos Zoulas <christos@astron.com> 820133359Sobrien 821133359Sobrien * Magic additions (Alex Ott) 822133359Sobrien * Fix bug that broke VPATH compilation (Peter Breitenlohner) 823133359Sobrien 824186691Sobrien2003-03-28 16:03 Christos Zoulas <christos@astron.com> 825133359Sobrien 826133359Sobrien * remove packed attribute from magic struct. 827133359Sobrien * make the magic struct properly aligned. 828133359Sobrien * bump version number of compiled files to 2. 829133359Sobrien 830186691Sobrien2003-03-27 13:10 Christos Zoulas <christos@astron.com> 831133359Sobrien 832133359Sobrien * separate tar detection and run it before softmagic. 833133359Sobrien * fix reversed symlink test. 834133359Sobrien * fix version printing. 835133359Sobrien * make separator a string instead of a char. 836133359Sobrien * update manual page and sort options. 837133359Sobrien 838186691Sobrien2003-03-26 11:00 Christos Zoulas <christos@astron.com> 839133359Sobrien 840133359Sobrien * Pass lint 841133359Sobrien * make NULL in magic_file mean stdin 842133359Sobrien * Fix "-" argument to file to pass NULL to magic_file 843133359Sobrien * avoid pointer casts by using memcpy 844133359Sobrien * rename magic_buf -> magic_buffer 845133359Sobrien * keep only the first error 846133359Sobrien * manual page: new sentence, new line 847133359Sobrien * fix typo in api function (magic_buf -> magic_buffer) 848