1*ddb17682Schristos2023-07-27 15:45 Christos Zoulas <christos@zoulas.com> 2*ddb17682Schristos 3*ddb17682Schristos * release 5.45 4*ddb17682Schristos 5*ddb17682Schristos2023-07-17 11:53 Christos Zoulas <christos@zoulas.com> 6*ddb17682Schristos 7*ddb17682Schristos * PR/465: psrok1: Avoid muslc asctime_r crash 8*ddb17682Schristos 9*ddb17682Schristos2023-05-21 13:05 Christos Zoulas <christos@zoulas.com> 10*ddb17682Schristos 11*ddb17682Schristos * add SIMH tape format support 12*ddb17682Schristos 13*ddb17682Schristos2023-02-09 12:50 Christos Zoulas <christos@zoulas.com> 14*ddb17682Schristos 15*ddb17682Schristos * bump the max size of the elf section notes to be read to 128K 16*ddb17682Schristos and make it configurable 17*ddb17682Schristos 18*ddb17682Schristos2023-01-08 1:08 Christos Zoulas <christos@zoulas.com> 19*ddb17682Schristos 20*ddb17682Schristos * PR/415: Fix decompression with program returning empty 21*ddb17682Schristos 22*ddb17682Schristos2022-12-26 1:47 Christos Zoulas <christos@zoulas.com> 23*ddb17682Schristos 24*ddb17682Schristos * PR/408: fix -p with seccomp 25*ddb17682Schristos * PR/412: fix MinGW compilation 26*ddb17682Schristos 27*ddb17682Schristos2022-12-26 12:26 Christos Zoulas <christos@zoulas.com> 28*ddb17682Schristos 29*ddb17682Schristos * release 5.44 30*ddb17682Schristos 31*ddb17682Schristos2022-12-14 9:24 Christos Zoulas <christos@zoulas.com> 32*ddb17682Schristos 33*ddb17682Schristos * Handle nan's so that we don't get internal floating point exceptions 34*ddb17682Schristos when they are enabled (Vincent Mihalkovic) 35*ddb17682Schristos 36*ddb17682Schristos2022-10-23 10:21 Christos Zoulas <christos@zoulas.com> 37*ddb17682Schristos 38*ddb17682Schristos * PR/397: Restore the ability to process files from stdin immediately. 39*ddb17682Schristos 401d4cb158Schristos2022-09-20 17:12 Christos Zoulas <christos@zoulas.com> 411d4cb158Schristos 421d4cb158Schristos * fixed various clustefuzz issues 431d4cb158Schristos 441d4cb158Schristos2022-09-19 15:54 Christos Zoulas <christos@zoulas.com> 451d4cb158Schristos 461d4cb158Schristos * Fix error detection for decompression code (Vincent Mihalkovic) 471d4cb158Schristos 481d4cb158Schristos2022-09-15 13:50 Christos Zoulas <christos@zoulas.com> 491d4cb158Schristos 501d4cb158Schristos * Add MAGIC_NO_COMPRESS_FORK and use it to produce a more 511d4cb158Schristos meaningful error message if we are sandboxing. 521d4cb158Schristos 531d4cb158Schristos2022-09-15 10:45 Christos Zoulas <christos@zoulas.com> 541d4cb158Schristos 551d4cb158Schristos * Add built-in lzip decompression support (Michal Gorny) 561d4cb158Schristos 571d4cb158Schristos2022-09-14 10:35 Christos Zoulas <christos@zoulas.com> 581d4cb158Schristos 591d4cb158Schristos * Add built-in zstd decompression support (Martin Rodriguez Reboredo) 601d4cb158Schristos 611d4cb158Schristos2022-09-13 14:55 Christos Zoulas <christos@zoulas.com> 621d4cb158Schristos 631d4cb158Schristos * release 5.43 641d4cb158Schristos 651d4cb158Schristos2022-09-10 9:17 Christos Zoulas <christos@zoulas.com> 661d4cb158Schristos 671d4cb158Schristos * Add octal indirect magic (Michal Gorny) 681d4cb158Schristos 691d4cb158Schristos2022-08-17 11:43 Christos Zoulas <christos@zoulas.com> 701d4cb158Schristos 711d4cb158Schristos * PR/374: avoid infinite loop in non-wide code (piru) 721d4cb158Schristos * PR/373: Obey MAGIC_CONTINUE with multiple magic files (vismarli) 731d4cb158Schristos 741d4cb158Schristos2022-07-26 11:10 Christos Zoulas <christos@zoulas.com> 751d4cb158Schristos 761d4cb158Schristos * Fix bug with large flist (Florian Weimer) 771d4cb158Schristos 781d4cb158Schristos2022-07-07 13:21 Christos Zoulas <christos@zoulas.com> 791d4cb158Schristos 801d4cb158Schristos * PR/364: Detect non-nul-terminated core filenames from QEMU 811d4cb158Schristos (mam-ableton) 821d4cb158Schristos 831d4cb158Schristos2022-07-04 15:45 Christos Zoulas <christos@zoulas.com> 841d4cb158Schristos 851d4cb158Schristos * PR/359: Add support for http://ndjson.org/ (darose) 861d4cb158Schristos * PR/362: Fix wide printing (ro-ee) 871d4cb158Schristos * PR/358: Fix width for -f - (jpalus) 881d4cb158Schristos * PR/356: Fix JSON constant parsing (davewhite) 891d4cb158Schristos 901d4cb158Schristos2022-06-10 9:40 Christos Zoulas <christos@zoulas.com> 911d4cb158Schristos 921d4cb158Schristos * release 5.42 931d4cb158Schristos 941d4cb158Schristos2022-05-31 14:50 Christos Zoulas <christos@zoulas.com> 951d4cb158Schristos 961d4cb158Schristos * PR/348: add missing cases to prevent file from aborting on 971d4cb158Schristos random magic files. 981d4cb158Schristos 991d4cb158Schristos2022-05-27 21:05 Christos Zoulas <christos@zoulas.com> 1001d4cb158Schristos 1011d4cb158Schristos * PR/351: octalify filenames when not raw before printing. 1021d4cb158Schristos 1031d4cb158Schristos2022-04-18 17:51 Christos Zoulas <christos@zoulas.com> 1041d4cb158Schristos 1051d4cb158Schristos * fix regex cacheing bug (Dirk Mueller) 1061d4cb158Schristos * merge file_regcomp and file_regerror() to simplify the code 1071d4cb158Schristos and reduce memory requirements for storing regexes (Dirk Mueller) 1081d4cb158Schristos 1091d4cb158Schristos2022-03-19 12:56 Christos Zoulas <christos@zoulas.com> 1101d4cb158Schristos 1111d4cb158Schristos * cache regex (Dirk Mueller) 1121d4cb158Schristos * detect filesystem full by flushing output (Dirk Mueller) 1131d4cb158Schristos 1141d4cb158Schristos2021-11-19 12:36 Christos Zoulas <christos@zoulas.com> 1151d4cb158Schristos 1161d4cb158Schristos * implement running decompressor programs using 1171d4cb158Schristos posix_spawnp(2) instead of vfork(2) 1181d4cb158Schristos 1191d4cb158Schristos2021-10-24 11:51 Christos Zoulas <christos@zoulas.com> 1201d4cb158Schristos 1211d4cb158Schristos * Add support for msdos dates and times 1221d4cb158Schristos 1231d4cb158Schristos2021-10-20 9:55 Christos Zoulas <christos@zoulas.com> 1241d4cb158Schristos 1251d4cb158Schristos * use the system byte swapping functions if available (Werner Fink) 1261d4cb158Schristos 1271d4cb158Schristos2021-10-18 11:57 Christos Zoulas <christos@zoulas.com> 1281d4cb158Schristos 1291d4cb158Schristos * release 5.41 1301d4cb158Schristos 1311d4cb158Schristos2021-09-23 03:51 Christos Zoulas <christos@zoulas.com> 1321d4cb158Schristos 1331d4cb158Schristos * Avinash Sonawane: Fix tzname detection 1341d4cb158Schristos 1351d4cb158Schristos2021-09-03 09:17 Christos Zoulas <christos@zoulas.com> 1361d4cb158Schristos 1371d4cb158Schristos * Fix relationship tests with "search" magic, don't short circuit 1381d4cb158Schristos logic 1391d4cb158Schristos 1401d4cb158Schristos2021-07-13 01:06 Christos Zoulas <christos@zoulas.com> 1411d4cb158Schristos 1421d4cb158Schristos * Fix memory leak in compile mode 1431d4cb158Schristos 1441d4cb158Schristos2021-07-01 03:51 Christos Zoulas <christos@zoulas.com> 1451d4cb158Schristos 1461d4cb158Schristos * PR/272: kiefermat: Only set returnval = 1 when we printed something 1471d4cb158Schristos (in all cases print or !print). This simplifies the logic and fixes 1481d4cb158Schristos the issue in the PR with -k and --mime-type there was no continuation 1491d4cb158Schristos printed before the default case. 1501d4cb158Schristos 1511d4cb158Schristos2021-06-30 13:07 Christos Zoulas <christos@zoulas.com> 1521d4cb158Schristos 1531d4cb158Schristos * PR/270: Don't translate unprintable characters in %s magic formats 1541d4cb158Schristos when -r 1551d4cb158Schristos * PR/269: Avoid undefined behavior with clang (adding offset to NULL) 1561d4cb158Schristos 1571d4cb158Schristos2021-05-09 18:38 Christos Zoulas <christos@zoulas.com> 1581d4cb158Schristos 1591d4cb158Schristos * Add a new flag (f) that requires that the match is a full word, 1601d4cb158Schristos not a partial word match. 1611d4cb158Schristos * Add varint types (unused) 1621d4cb158Schristos 1631d4cb158Schristos2021-04-19 17:17 Christos Zoulas <christos@zoulas.com> 1641d4cb158Schristos 1651d4cb158Schristos * PR/256: mutableVoid: If the file is less than 3 bytes, use the file 1661d4cb158Schristos length to determine type 1671d4cb158Schristos * PR/259: aleksandr.v.novichkov: mime printing through indirect magic 1681d4cb158Schristos is not taken into account, use match directly so that it does. 1691d4cb158Schristos 1701d4cb158Schristos2021-04-04 17:02 Christos Zoulas <christos@zoulas.com> 1711d4cb158Schristos 1721d4cb158Schristos * count the total bytes found not the total byte positions 1731d4cb158Schristos in order to determine encoding (Anatol Belski) 1741d4cb158Schristos 175d87b0039Schristos2021-03-30 20:21 Christos Zoulas <christos@zoulas.com> 176d87b0039Schristos 177d87b0039Schristos * release 5.40 178d87b0039Schristos 179d87b0039Schristos2021-02-05 16:31 Christos Zoulas <christos@zoulas.com> 180d87b0039Schristos 181d87b0039Schristos * PR/234: Add limit to the number of bytes to scan for encoding 182d87b0039Schristos * PR/230: Fix /T (trim flag) for regex 183d87b0039Schristos 184d87b0039Schristos2021-02-01 12:31 Christos Zoulas <christos@zoulas.com> 185d87b0039Schristos * PR/77: Trim trailing separator. 186d87b0039Schristos 187d87b0039Schristos2020-12-17 15:44 Christos Zoulas <christos@zoulas.com> 188d87b0039Schristos 189d87b0039Schristos * PR/211: Convert system read errors from corrupt ELF 190d87b0039Schristos files into human readable error messages 191d87b0039Schristos 192d87b0039Schristos2020-12-08 16:24 Christos Zoulas <christos@zoulas.com> 193d87b0039Schristos 194d87b0039Schristos * fix multithreaded decompression file descriptor issue 195d87b0039Schristos by using close-on-exec (Denys Vlasenko) 196d87b0039Schristos 197d87b0039Schristos2020-06-27 11:58 Christos Zoulas <christos@zoulas.com> 198d87b0039Schristos 199d87b0039Schristos * Exclude surrogate pairs from utf-8 detection (Michael Liu) 200d87b0039Schristos 201d87b0039Schristos2020-06-25 12:53 Christos Zoulas <christos@zoulas.com> 202d87b0039Schristos 203d87b0039Schristos * Include # to the list of ignored format chars (Werner Fink) 204d87b0039Schristos 20529faeba7Schristos2020-06-14 20:02 Christos Zoulas <christos@zoulas.com> 20629faeba7Schristos 20729faeba7Schristos * release 5.39 20829faeba7Schristos 20929faeba7Schristos2020-06-07 20:00 Christos Zoulas <christos@zoulas.com> 21029faeba7Schristos 21129faeba7Schristos * Remove unused subtype_mime (Steve Grubb) 21229faeba7Schristos * Remove unused check in okstat (Steve Grubb) 21329faeba7Schristos * Fix mime-type in elf binaries by making sure $x is set 21429faeba7Schristos * Fix indirect negative offsets broken by OFFNEGATIVE 21529faeba7Schristos * Fix GUID equality check 21629faeba7Schristos * PR/165: Handle empty array and strings in JSON 21729faeba7Schristos * PR/162: Add --exclude-quiet 21829faeba7Schristos 21929faeba7Schristos2020-06-06 15:33 Christos Zoulas <christos@zoulas.com> 22029faeba7Schristos 22129faeba7Schristos * Fix memory leak in ascmagic (Steve Grubb) 22229faeba7Schristos 22329faeba7Schristos2020-06-04 00:21 Christos Zoulas <christos@zoulas.com> 22429faeba7Schristos 22529faeba7Schristos * Fix string comparison length with ignore whitespace 22629faeba7Schristos 22729faeba7Schristos2020-05-31 00:11 Christos Zoulas <christos@zoulas.com> 22829faeba7Schristos 22929faeba7Schristos * Fix mingwin 64 compilation 23029faeba7Schristos 23129faeba7Schristos2020-05-30 23:56 Christos Zoulas <christos@zoulas.com> 23229faeba7Schristos 23329faeba7Schristos * PR/159: whitelist getpid needed for file_pipe2file() 23429faeba7Schristos 23529faeba7Schristos2020-05-09 18:57 Christos Zoulas <christos@zoulas.com> 23629faeba7Schristos 23729faeba7Schristos * Indicate negative offsets with a flag OFFNEGATIVE 23829faeba7Schristos so that -0 works. 23929faeba7Schristos * Introduce "offset" magic type that can be used to 24029faeba7Schristos detect the file size, and bail on short files. 24129faeba7Schristos * document DER better in the magic man page. 24229faeba7Schristos 24329faeba7Schristos2020-03-11 21:53 Christos Zoulas <christos@zoulas.com> 24429faeba7Schristos 24529faeba7Schristos * fix memory leaks (SonarQube) 24629faeba7Schristos 24729faeba7Schristos2020-03-08 21:33 Christos Zoulas <christos@zoulas.com> 24829faeba7Schristos 24929faeba7Schristos * fix memory leaks (SonarQube) 25029faeba7Schristos * rewrite confusing loops (SonarQube) 25129faeba7Schristos * fix bogus test (SonarQube) 25229faeba7Schristos * pass a sized buffer to file_fmttime() (SonarQube) 25329faeba7Schristos 25429faeba7Schristos * fix memory leaks (SonarQube) 25529faeba7Schristos 25629faeba7Schristos2020-02-20 15:50 Christos Zoulas <christos@zoulas.com> 25729faeba7Schristos 25829faeba7Schristos * Don't allow * in printf formats, or the code itself (Christoph Biedl) 25929faeba7Schristos * Introduce a printf output size checker to avoid DoS attacks 26029faeba7Schristos 26129faeba7Schristos2020-02-17 17:22 Christos Zoulas <christos@zoulas.com> 26229faeba7Schristos 26329faeba7Schristos * Avoid memory leak on error (oss-fuzz) 26429faeba7Schristos * Check length of string on DER before derefercing and add new types 26529faeba7Schristos * Add missing DER string (oss-fuzz) 26629faeba7Schristos 26729faeba7Schristos2020-02-16 20:45 Christos Zoulas <christos@zoulas.com> 26829faeba7Schristos 26929faeba7Schristos * Add missing DER types, and debugging 27029faeba7Schristos 27129faeba7Schristos2020-02-13 13:10 Christos Zoulas <christos@zoulas.com> 27229faeba7Schristos 27329faeba7Schristos * PR/140: Avoid abort with hand-crafted magic file (gockelhahn) 27429faeba7Schristos * PR/139 Avoid DoS in printf with hand-crafted magic file (gockelhahn) 27529faeba7Schristos * PR/138: Avoid crash with hand-crafted magic file (gockelhahn) 27629faeba7Schristos 27729faeba7Schristos2020-02-12 17:30 Christos Zoulas <christos@zoulas.com> 27829faeba7Schristos 27929faeba7Schristos * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine) 28029faeba7Schristos 28129faeba7Schristos2019-12-24 14:16 Christos Zoulas <christos@zoulas.com> 28229faeba7Schristos 28329faeba7Schristos * add guid support 28429faeba7Schristos 28578a23c3aSchristos2019-12-16 21:11 Christos Zoulas <christos@zoulas.com> 28678a23c3aSchristos 28778a23c3aSchristos * release 5.38 28878a23c3aSchristos 28978a23c3aSchristos2019-12-15 22:13 Christos Zoulas <christos@zoulas.com> 29078a23c3aSchristos Document changes since the previous release: 29178a23c3aSchristos - Always accept -S (no sandbox) even if we don't support sandboxing 292*ddb17682Schristos - More syscalls elided for sandboxing 29378a23c3aSchristos - For ELF dynamic means having an interpreter not just PT_DYNAMIC 29478a23c3aSchristos - Check for large ELF session header offset 29578a23c3aSchristos - When saving and restoring a locale, keep the locale name in our 29678a23c3aSchristos own storage. 29778a23c3aSchristos - Add a flag to disable CSV file detection. 29878a23c3aSchristos - Don't pass NULL/0 to memset to appease sanitizers. 29978a23c3aSchristos - Avoid spurious prints when looks for extensions or apple strings 30078a23c3aSchristos in fsmagic. 30178a23c3aSchristos - Add builtin decompressors for xz and and bzip. 30278a23c3aSchristos - Add a limit for the number of CDF elements. 30378a23c3aSchristos - More checks for overflow in CDF. 30478a23c3aSchristos 305d0c65b7bSchristos2019-05-14 22:26 Christos Zoulas <christos@zoulas.com> 306d0c65b7bSchristos 307d0c65b7bSchristos * release 5.37 308d0c65b7bSchristos 309d0c65b7bSchristos2019-05-09 22:27 Christos Zoulas <christos@zoulas.com> 310d0c65b7bSchristos 311d0c65b7bSchristos * Make sure that continuation separators are printed 312d0c65b7bSchristos with -k within softmagic 313d0c65b7bSchristos 314d0c65b7bSchristos2019-05-06 22:27 Christos Zoulas <christos@zoulas.com> 315d0c65b7bSchristos 316d0c65b7bSchristos * Change SIGPIPE saving and restoring during compression to use 317d0c65b7bSchristos sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko) 318d0c65b7bSchristos * Cache stat(2) calls more to reduce number of calls (Denys Vlasenko) 319d0c65b7bSchristos 320d0c65b7bSchristos2019-05-06 17:25 Christos Zoulas <christos@zoulas.com> 321d0c65b7bSchristos 322d0c65b7bSchristos * PR/77: Handle --mime-type and -k correctly. 323d0c65b7bSchristos 324d0c65b7bSchristos2019-05-03 15:26 Christos Zoulas <christos@zoulas.com> 325d0c65b7bSchristos 326d0c65b7bSchristos * Switch decompression code to use vfork() because 327d0c65b7bSchristos tools like rpmdiff and rpmbuild call libmagic 328d0c65b7bSchristos with large process footprints (Denys Vlasenko) 329d0c65b7bSchristos 330d0c65b7bSchristos2019-04-07 14:05 Christos Zoulas <christos@zoulas.com> 331d0c65b7bSchristos 332d0c65b7bSchristos * PR/75: --enable-zlib, did not work. 333d0c65b7bSchristos 334d0c65b7bSchristos2019-02-27 11:54 Christos Zoulas <christos@zoulas.com> 335d0c65b7bSchristos 336d0c65b7bSchristos * Improve regex efficiency (Michael Schroeder) by: 337d0c65b7bSchristos 1. Prefixing regex searches with regular search 338d0c65b7bSchristos for keywords where possible 339d0c65b7bSchristos 2. Using memmem(3) where available 340d0c65b7bSchristos 341d0c65b7bSchristos2019-02-20 10:16 Christos Zoulas <christos@zoulas.com> 342d0c65b7bSchristos 343d0c65b7bSchristos * release 5.36 344d0c65b7bSchristos 345d0c65b7bSchristos2019-02-19 15:30 Christos Zoulas <christos@zoulas.com> 346d0c65b7bSchristos 347d0c65b7bSchristos * Fix cast to use cast macros 348d0c65b7bSchristos * Add UCS-32 builtin detection (PR/61) reported by tmc 349d0c65b7bSchristos 350d0c65b7bSchristos2019-02-18 18:24 Christos Zoulas <christos@zoulas.com> 351d0c65b7bSchristos 352d0c65b7bSchristos * Fix stack read (PR/62) and write (PR/64) stack overflows 353d0c65b7bSchristos reported by spinpx 354d0c65b7bSchristos 355c02f7f97Schristos2018-10-18 19:32 Christos Zoulas <christos@zoulas.com> 356c02f7f97Schristos 357c02f7f97Schristos * release 5.35 358c02f7f97Schristos 359c02f7f97Schristos2018-09-10 20:38 Christos Zoulas <christos@zoulas.com> 360c02f7f97Schristos 361c02f7f97Schristos * Add FreeBSD ELF core file support (John Baldwin) 362c02f7f97Schristos 363c02f7f97Schristos2018-08-20 18:40 Christos Zoulas <christos@zoulas.com> 364c02f7f97Schristos 365c02f7f97Schristos * PR/30: Allow all parameter values to be set (don't treat 0 specially) 366c02f7f97Schristos * handle default annotations on the softmagic match instead at the 367c02f7f97Schristos end. 368c02f7f97Schristos 369c02f7f97Schristos2018-07-25 10:17 Christos Zoulas <christos@zoulas.com> 370c02f7f97Schristos 371c02f7f97Schristos * PR/23: Recognize JSON files 372c02f7f97Schristos 373c02f7f97Schristos2018-07-25 10:17 Christos Zoulas <christos@zoulas.com> 374c02f7f97Schristos 375c02f7f97Schristos * PR/18: file --mime-encoding should not print mime-type 376c02f7f97Schristos 377c02f7f97Schristos2018-07-25 8:50 Christos Zoulas <christos@zoulas.com> 378c02f7f97Schristos 379c02f7f97Schristos * release 5.34 380c02f7f97Schristos 381c02f7f97Schristos2018-06-22 16:38 Christos Zoulas <christos@zoulas.com> 382c02f7f97Schristos 383c02f7f97Schristos * Add Quad indirect offsets 384c02f7f97Schristos 385c02f7f97Schristos2018-05-24 14:10 Christos Zoulas <christos@zoulas.com> 386c02f7f97Schristos 387c02f7f97Schristos * Enable parsing of ELF dynamic sections to handle PIE better 388c02f7f97Schristos 3895efe63deSchristos2018-04-15 14:52 Christos Zoulas <christos@zoulas.com> 3905efe63deSchristos 3915efe63deSchristos * release 5.33 3925efe63deSchristos 3935efe63deSchristos2018-02-24 14:50 Christos Zoulas <christos@zoulas.com> 3945efe63deSchristos 3955efe63deSchristos * extend the support for ${x?:} expansions for magic descriptions 3965efe63deSchristos 3975efe63deSchristos2018-02-21 16:25 Christos Zoulas <christos@zoulas.com> 3985efe63deSchristos 3995efe63deSchristos * add support for ${x?:} in mime types to handle 4005efe63deSchristos pie binaries. 4015efe63deSchristos 4025efe63deSchristos2017-11-03 9:23 Christos Zoulas <christos@zoulas.com> 4035efe63deSchristos 4045efe63deSchristos * add support for negative offsets (offsets from the end of file) 4055efe63deSchristos 4065efe63deSchristos2017-09-26 8:22 Christos Zoulas <christos@zoulas.com> 4075efe63deSchristos 4085efe63deSchristos * close the file on error when writing magic (Steve Grubb) 4095efe63deSchristos 4105efe63deSchristos2017-09-24 12:02 Christos Zoulas <christos@zoulas.com> 4115efe63deSchristos 4125efe63deSchristos * seccomp support (Paul Moore) 4135efe63deSchristos 414051bdd9aSchristos2017-09-02 11:53 Christos Zoulas <christos@zoulas.com> 415051bdd9aSchristos 416051bdd9aSchristos * release 5.32 417051bdd9aSchristos 418051bdd9aSchristos2017-08-28 16:37 Christos Zoulas <christos@zoulas.com> 419051bdd9aSchristos 420051bdd9aSchristos * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) 421051bdd9aSchristos 422051bdd9aSchristos2017-08-27 03:55 Christos Zoulas <christos@zoulas.com> 423051bdd9aSchristos 424051bdd9aSchristos * Fix always true condition (Thomas Jarosch) 425051bdd9aSchristos 426051bdd9aSchristos2017-05-24 17:30 Christos Zoulas <christos@zoulas.com> 427051bdd9aSchristos 428051bdd9aSchristos * pickier parsing of numeric values in magic files. 429051bdd9aSchristos 430051bdd9aSchristos2017-05-23 17:55 Christos Zoulas <christos@zoulas.com> 431051bdd9aSchristos 432051bdd9aSchristos * PR/615 add magic_getflags() 433051bdd9aSchristos 434051bdd9aSchristos2017-05-23 13:55 Christos Zoulas <christos@zoulas.com> 435051bdd9aSchristos 436051bdd9aSchristos * release 5.31 437051bdd9aSchristos 438e2725312Schristos2017-03-17 20:32 Christos Zoulas <christos@zoulas.com> 439e2725312Schristos 440e2725312Schristos * remove trailing spaces from magic files 441e2725312Schristos * refactor is_tar 442e2725312Schristos * better bounds checks for cdf 443e2725312Schristos 44474db5203Schristos2017-02-10 12:24 Christos Zoulas <christos@zoulas.com> 44574db5203Schristos 44674db5203Schristos * release 5.30 44774db5203Schristos 44874db5203Schristos2017-02-07 23:27 Christos Zoulas <christos@zoulas.com> 44974db5203Schristos 45074db5203Schristos * If we exceeded the offset in a search return no match 45174db5203Schristos (Christoph Biedl) 45274db5203Schristos * Be more lenient on corrupt CDF files (Christoph Biedl) 45374db5203Schristos 45474db5203Schristos2017-02-04 16:46 Christos Zoulas <christos@zoulas.com> 45574db5203Schristos 45674db5203Schristos * pacify ubsan sign extension (oss-fuzz/524) 45774db5203Schristos 45874db5203Schristos2017-02-01 12:42 Christos Zoulas <christos@zoulas.com> 45974db5203Schristos 46074db5203Schristos * off by one in cdf parsing (PR/593) 46174db5203Schristos * report debugging sections in elf (PR/591) 46274db5203Schristos 46374db5203Schristos2016-11-06 10:52 Christos Zoulas <christos@zoulas.com> 46474db5203Schristos 46574db5203Schristos * Allow @@@ in extensions 46674db5203Schristos * Add missing overflow check in der magic (Jonas Wagner) 46774db5203Schristos 46874db5203Schristos2016-10-25 10:40 Christos Zoulas <christos@zoulas.com> 46974db5203Schristos 47074db5203Schristos * release 5.29 47174db5203Schristos 47274db5203Schristos2016-10-24 11:20 Christos Zoulas <christos@zoulas.com> 47374db5203Schristos 47474db5203Schristos * der getlength overflow (Jonas Wagner) 47574db5203Schristos * multiple magic file load failure (Christoph Biedl) 47674db5203Schristos 47774db5203Schristos2016-10-17 11:26 Christos Zoulas <christos@zoulas.com> 47874db5203Schristos 47974db5203Schristos * CDF parsing improvements (Guy Helmer) 48074db5203Schristos 48174db5203Schristos2016-07-20 7:26 Christos Zoulas <christos@zoulas.com> 48274db5203Schristos 48374db5203Schristos * Add support for signed indirect offsets 48474db5203Schristos 48574db5203Schristos2016-07-18 7:41 Christos Zoulas <christos@zoulas.com> 48674db5203Schristos 48774db5203Schristos * cat /dev/null | file - should print empty (Christoph Biedl) 48874db5203Schristos 48974db5203Schristos2016-07-05 15:20 Christos Zoulas <christos@zoulas.com> 49074db5203Schristos 49174db5203Schristos * Bump string size from 64 to 96. 49274db5203Schristos 49374db5203Schristos2016-06-13 20:20 Christos Zoulas <christos@zoulas.com> 49474db5203Schristos 49574db5203Schristos * PR/556: Fix separators on annotations. 49674db5203Schristos 49774db5203Schristos2016-06-13 19:40 Christos Zoulas <christos@zoulas.com> 49874db5203Schristos 49974db5203Schristos * release 5.28 50074db5203Schristos * fix leak on allocation failure 50174db5203Schristos 50274db5203Schristos2016-06-01 1:20 Christos Zoulas <christos@zoulas.com> 50374db5203Schristos 50474db5203Schristos * PR/555: Avoid overflow for offset > nbytes 50574db5203Schristos * PR/550: Segv on DER parsing: 50674db5203Schristos - use the correct variable for length 50774db5203Schristos - set offset to 0 on failure. 50874db5203Schristos 50974db5203Schristos2016-05-13 12:00 Christos Zoulas <christos@zoulas.com> 51074db5203Schristos 51174db5203Schristos * release 5.27 51274db5203Schristos 51374db5203Schristos2016-04-18 9:35 Christos Zoulas <christos@zoulas.com> 51474db5203Schristos 51574db5203Schristos * Errors comparing DER entries or computing offsets 51674db5203Schristos are just indications of malformed non-DER files. 51774db5203Schristos Don't print them. 51874db5203Schristos * Offset comparison was off-by-one. 51974db5203Schristos * Fix compression code (Werner Fink) 52074db5203Schristos * Put new bytes constant in the right file (not the generated one) 52174db5203Schristos 52274db5203Schristos2016-04-16 18:34 Christos Zoulas <christos@zoulas.com> 52374db5203Schristos 52474db5203Schristos * release 5.26 52574db5203Schristos 52674db5203Schristos2016-03-31 13:50 Christos Zoulas <christos@zoulas.com> 52774db5203Schristos 52874db5203Schristos * make the number of bytes read from files configurable. 52974db5203Schristos 53074db5203Schristos2016-03-21 13:40 Christos Zoulas <christos@zoulas.com> 53174db5203Schristos 53274db5203Schristos * Add bounds checks for DER code (discovered by Thomas Jarosch) 53374db5203Schristos * Change indirect recursion limit to indirect use count and 53474db5203Schristos bump from 15 to 50 to prevent abuse. 53574db5203Schristos 53674db5203Schristos2016-03-13 20:39 Christos Zoulas <christos@zoulas.com> 53774db5203Schristos 53874db5203Schristos * Add -00 which prints filename\0description\0 53974db5203Schristos 54074db5203Schristos2016-03-01 13:28 Christos Zoulas <christos@zoulas.com> 54174db5203Schristos 54274db5203Schristos * Fix ID3 indirect parsing 54374db5203Schristos 54474db5203Schristos2016-01-19 10:18 Christos Zoulas <christos@zoulas.com> 54574db5203Schristos 54674db5203Schristos * add DER parsing capability 54774db5203Schristos 54874db5203Schristos2015-11-13 10:35 Christos Zoulas <christos@zoulas.com> 54974db5203Schristos 55074db5203Schristos * provide dprintf(3) for the OS's that don't have it. 55174db5203Schristos 55274db5203Schristos2015-11-11 16:25 Christos Zoulas <christos@zoulas.com> 55374db5203Schristos 55474db5203Schristos * redo the compression code report decompression errors 55574db5203Schristos 55674db5203Schristos2015-11-10 23:25 Christos Zoulas <christos@zoulas.com> 55774db5203Schristos 55874db5203Schristos * REG_STARTEND code is not working as expected, delete it. 55974db5203Schristos 56074db5203Schristos2015-11-09 16:05 Christos Zoulas <christos@zoulas.com> 56174db5203Schristos 56274db5203Schristos * Add zlib support if we have it. 56374db5203Schristos 56474db5203Schristos2015-11-05 11:22 Christos Zoulas <christos@zoulas.com> 56574db5203Schristos 56674db5203Schristos * PR/492: compression forking was broken with magic_buffer. 56774db5203Schristos 56874db5203Schristos2015-09-16 9:50 Christos Zoulas <christos@zoulas.com> 56974db5203Schristos 57074db5203Schristos * release 5.25 57174db5203Schristos 57274db5203Schristos2015-09-11 13:25 Christos Zoulas <christos@zoulas.com> 57374db5203Schristos 57474db5203Schristos * add a limit to the length of regex searches 57574db5203Schristos 57674db5203Schristos2015-09-08 9:50 Christos Zoulas <christos@zoulas.com> 57774db5203Schristos 57874db5203Schristos * fix problems with --parameter (Christoph Biedl) 57974db5203Schristos 58074db5203Schristos2015-07-11 10:35 Christos Zoulas <christos@zoulas.com> 58174db5203Schristos 58274db5203Schristos * Windows fixes PR/466 (Jason Hood) 58374db5203Schristos 58474db5203Schristos2015-07-09 10:35 Christos Zoulas <christos@zoulas.com> 58574db5203Schristos 58674db5203Schristos * release 5.24 58774db5203Schristos 58874db5203Schristos2015-06-11 8:52 Christos Zoulas <christos@zoulas.com> 58974db5203Schristos 59074db5203Schristos * redo long option encoding to fix off-by-one in 5.23 59174db5203Schristos 59274db5203Schristos2015-06-10 13:50 Christos Zoulas <christos@zoulas.com> 59374db5203Schristos 59474db5203Schristos * release 5.23 59574db5203Schristos 59674db5203Schristos2015-06-09 16:10 Christos Zoulas <christos@zoulas.com> 59774db5203Schristos 59874db5203Schristos * Fix issue with regex range for magic with offset 59974db5203Schristos * Always return true from mget with USE (success to mget not match 60074db5203Schristos indication). Fixes mime evaluation after USE magic 60174db5203Schristos * PR/459: Don't insert magic entries to the list if there are parsing 60274db5203Schristos errors for them. 60374db5203Schristos 60474db5203Schristos2015-06-03 16:00 Christos Zoulas <christos@zoulas.com> 60574db5203Schristos 60674db5203Schristos * PR/455: Add utf-7 encoding 60774db5203Schristos 60874db5203Schristos2015-06-03 14:30 Christos Zoulas <christos@zoulas.com> 60974db5203Schristos 61074db5203Schristos * PR/455: Implement -Z, look inside, but don't report on compression 61174db5203Schristos * PR/454: Fix allocation error on bad magic. 61274db5203Schristos 61374db5203Schristos2015-05-29 10:30 Christos Zoulas <christos@zoulas.com> 61474db5203Schristos 61574db5203Schristos * handle MAGIC_CONTINUE everywhere, not just in softmagic 61674db5203Schristos 61774db5203Schristos2015-05-21 14:30 Christos Zoulas <christos@zoulas.com> 61874db5203Schristos 61974db5203Schristos * don't print descriptions for NAME types when mime. 62074db5203Schristos 62174db5203Schristos2015-04-09 15:59 Christos Zoulas <christos@zoulas.com> 62274db5203Schristos 62374db5203Schristos * Add --extension to list the known extensions for this file type 62474db5203Schristos Idea by Andrew J Roazen 62574db5203Schristos 62674db5203Schristos2015-02-14 12:23 Christos Zoulas <christos@zoulas.com> 62774db5203Schristos 62874db5203Schristos * Bump file search buffer size to 1M. 62974db5203Schristos 63074db5203Schristos2015-01-09 14:35 Christos Zoulas <christos@zoulas.com> 63174db5203Schristos 63274db5203Schristos * Fix multiple issues with date formats reported by Christoph Biedl: 63374db5203Schristos - T_LOCAL meaning was reversed 63474db5203Schristos - Arithmetic did not work 63574db5203Schristos Also stop adjusting daylight savings for gmt printing. 63674db5203Schristos 63774db5203Schristos2015-01-05 13:00 Christos Zoulas <christos@zoulas.com> 63874db5203Schristos 63974db5203Schristos * PR/411: Fix memory corruption from corrupt cdf file. 64074db5203Schristos 641fa9ee498Schristos2015-01-02 15:15 Christos Zoulas <christos@zoulas.com> 642fa9ee498Schristos 643fa9ee498Schristos * release 5.22 644fa9ee498Schristos 645fa9ee498Schristos2015-01-01 12:01 Christos Zoulas <christos@zoulas.com> 646fa9ee498Schristos 647fa9ee498Schristos * add indirect relative for TIFF/Exif 648fa9ee498Schristos 649fa9ee498Schristos2014-12-16 18:10 Christos Zoulas <christos@zoulas.com> 650fa9ee498Schristos 651fa9ee498Schristos * restructure elf note printing to avoid repeated messages 652fa9ee498Schristos * add note limit, suggested by Alexander Cherepanov 653fa9ee498Schristos 654fa9ee498Schristos2014-12-16 16:53 Christos Zoulas <christos@zoulas.com> 655fa9ee498Schristos 656fa9ee498Schristos * Bail out on partial pread()'s (Alexander Cherepanov) 657fa9ee498Schristos * Fix incorrect bounds check in file_printable (Alexander Cherepanov) 658fa9ee498Schristos 659fa9ee498Schristos2014-12-11 20:01 Christos Zoulas <christos@zoulas.com> 660fa9ee498Schristos 661fa9ee498Schristos * PR/405: ignore SIGPIPE from uncompress programs 662fa9ee498Schristos * change printable -> file_printable and use it in 663fa9ee498Schristos more places for safety 664fa9ee498Schristos * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP 665fa9ee498Schristos is present print the interpreter name. 666fa9ee498Schristos 667fa9ee498Schristos2014-12-10 20:01 Christos Zoulas <christos@zoulas.com> 668fa9ee498Schristos 669fa9ee498Schristos * release 5.21 670fa9ee498Schristos 671fa9ee498Schristos2014-11-27 18:40 Christos Zoulas <christos@zoulas.com> 672fa9ee498Schristos 673fa9ee498Schristos * Allow setting more parameters from the command line. 674fa9ee498Schristos * Split name/use and indirect magic recursion limits. 675fa9ee498Schristos 676fa9ee498Schristos2014-11-27 11:12 Christos Zoulas <christos@zoulas.com> 677fa9ee498Schristos 678fa9ee498Schristos * Adjust ELF parameters and the default recursion 679fa9ee498Schristos level. 680fa9ee498Schristos * Allow setting the recursion level dynamically. 681fa9ee498Schristos 682fa9ee498Schristos2014-11-24 8:55 Christos Zoulas <christos@zoulas.com> 683fa9ee498Schristos 684fa9ee498Schristos * The following fixes resulted from Thomas Jarosch's fuzzing 685fa9ee498Schristos tests that revealed severe performance issues on pathological 686fa9ee498Schristos input: 687fa9ee498Schristos - limit number of elf program and sections processing 688fa9ee498Schristos - abort elf note processing quickly 689fa9ee498Schristos - reduce the number of recursion levels from 20 to 10 690fa9ee498Schristos - preserve error messages in indirect magic handling 691fa9ee498Schristos 692fa9ee498Schristos This is tracked as CVE-2014-8116 and CVE-2014-8117 693fa9ee498Schristos 694fa9ee498Schristos2014-11-12 10:30 Christos Zoulas <christos@zoulas.com> 695fa9ee498Schristos 696fa9ee498Schristos * fix bogus free in the user buffer case. 697fa9ee498Schristos 698fa9ee498Schristos2014-11-11 12:35 Christos Zoulas <christos@zoulas.com> 699fa9ee498Schristos 700fa9ee498Schristos * fix out of bounds read for pascal strings 701fa9ee498Schristos * fix memory leak (not freeing the head of each mlist) 702fa9ee498Schristos 703fa9ee498Schristos2014-11-07 10:25 Christos Zoulas <christos@zoulas.com> 704fa9ee498Schristos 705fa9ee498Schristos * When printing strings from a file, convert them to printable 706fa9ee498Schristos on a byte by byte basis, so that we don't get issues with 707fa9ee498Schristos locale's trying to interpret random byte streams as UTF-8 and 708fa9ee498Schristos having printf error out with EILSEQ. 709fa9ee498Schristos 71067990773Schristos2014-10-17 11:48 Christos Zoulas <christos@zoulas.com> 71167990773Schristos 71267990773Schristos * fix bounds in note reading (Francisco Alonso / Red Hat) 71367990773Schristos 71467990773Schristos2014-10-11 15:02 Christos Zoulas <christos@zoulas.com> 71567990773Schristos 71667990773Schristos * fix autoconf glue for setlocale and locale_t; some OS's 71767990773Schristos have locale_t in xlocale.h 71867990773Schristos 719ebfd1121Schristos2014-10-10 15:01 Christos Zoulas <christos@zoulas.com> 720ebfd1121Schristos 721ebfd1121Schristos * release 5.20 722ebfd1121Schristos 723ebfd1121Schristos2014-08-17 10:01 Christos Zoulas <christos@zoulas.com> 724ebfd1121Schristos 725ebfd1121Schristos * recognize encrypted CDF documents 726ebfd1121Schristos 727ebfd1121Schristos2014-08-04 9:18 Christos Zoulas <christos@zoulas.com> 728ebfd1121Schristos 729ebfd1121Schristos * add magic_load_buffers from Brooks Davis 730ebfd1121Schristos 731ebfd1121Schristos2014-07-24 16:40 Christos Zoulas <christos@zoulas.com> 732ebfd1121Schristos 733ebfd1121Schristos * add thumbs.db support 734ebfd1121Schristos 735012fd133Schristos2014-06-12 12:28 Christos Zoulas <christos@zoulas.com> 736012fd133Schristos 737012fd133Schristos * release 5.19 738012fd133Schristos 739012fd133Schristos2014-06-09 9:04 Christos Zoulas <christos@zoulas.com> 740012fd133Schristos 741012fd133Schristos * Misc buffer overruns and missing buffer size tests in cdf parsing 742012fd133Schristos (Francisco Alonso, Jan Kaluza) 743012fd133Schristos 744012fd133Schristos2014-06-02 14:50 Christos Zoulas <christos@zoulas.com> 745012fd133Schristos 746012fd133Schristos * Enforce limit of 8K on regex searches that have no limits 747012fd133Schristos * Allow the l modifier for regex to mean line count. Default 748012fd133Schristos to byte count. If line count is specified, assume a max 749012fd133Schristos of 80 characters per line to limit the byte count. 750012fd133Schristos * Don't allow conversions to be used for dates, allowing 751012fd133Schristos the mask field to be used as an offset. 752012fd133Schristos 753012fd133Schristos2014-05-30 12:51 Christos Zoulas <christos@zoulas.com> 754012fd133Schristos 755012fd133Schristos * Make the range operator limit the length of the 756012fd133Schristos regex search. 757012fd133Schristos 758012fd133Schristos2014-05-14 19:23 Christos Zoulas <christos@zoulas.com> 759012fd133Schristos 760012fd133Schristos * PR/347: Windows fixes 761012fd133Schristos * PR/352: Hangul word processor recognition 762012fd133Schristos * PR/354: Encoding irregularities in text files 763012fd133Schristos 764012fd133Schristos2014-05-06 6:12 Christos Zoulas <christos@zoulas.com> 765012fd133Schristos 766012fd133Schristos * Fix uninitialized title in CDF files (Jan Kaluza) 767012fd133Schristos 768012fd133Schristos2014-05-04 14:55 Christos Zoulas <christos@zoulas.com> 769012fd133Schristos 770012fd133Schristos * PR/351: Fix compilation of empty files 771012fd133Schristos 772012fd133Schristos2014-04-30 17:39 Christos Zoulas <christos@zoulas.com> 773012fd133Schristos 774012fd133Schristos * Fix integer formats: We don't specify 'l' or 775012fd133Schristos 'h' and 'hh' specifiers anymore, only 'll' for 776012fd133Schristos quads and nothing for the rest. This is so that 777012fd133Schristos magic writing is simpler. 778012fd133Schristos 779012fd133Schristos2014-04-01 15:25 Christos Zoulas <christos@zoulas.com> 780012fd133Schristos 781012fd133Schristos * PR/341: Jan Kaluza, fix memory leak 782012fd133Schristos * PR/342: Jan Kaluza, fix out of bounds read 783012fd133Schristos 784012fd133Schristos2014-03-28 15:25 Christos Zoulas <christos@zoulas.com> 785012fd133Schristos 786012fd133Schristos * Fix issue with long formats not matching fmtcheck 787012fd133Schristos 788012fd133Schristos2014-03-26 11:25 Christos Zoulas <christos@zoulas.com> 789012fd133Schristos 790012fd133Schristos * release 5.18 791012fd133Schristos 792012fd133Schristos2014-03-15 17:45 Christos Zoulas <christos@zoulas.com> 793012fd133Schristos 794012fd133Schristos * add fmtcheck(3) for those who don't have it 795012fd133Schristos 796012fd133Schristos2014-03-14 15:12 Christos Zoulas <christos@zoulas.com> 797012fd133Schristos 798012fd133Schristos * prevent mime entries from being attached to magic 799012fd133Schristos entries with no descriptions 800012fd133Schristos 801012fd133Schristos * adjust magic strength for regex type 802012fd133Schristos 803012fd133Schristos * remove superfluous ascmagic with encoding test 804012fd133Schristos 805012fd133Schristos2014-03-06 12:01 Christos Zoulas <christos@zoulas.com> 806012fd133Schristos 807012fd133Schristos * fix regression fix echo -ne "\012\013\014" | file -i - 808012fd133Schristos which printed "binary" instead of "application/octet-stream" 809012fd133Schristos 810012fd133Schristos * add size_t overflow check for magic file size 811012fd133Schristos 812012fd133Schristos2014-02-27 16:01 Christos Zoulas <christos@zoulas.com> 813012fd133Schristos 814012fd133Schristos * experimental support for matching with CFD CLSID 815012fd133Schristos 816012fd133Schristos2014-02-18 13:04 Kimmo Suominen (kimmo@suominen.com) 817012fd133Schristos 818012fd133Schristos * Cache old LC_CTYPE locale before setting it to "C", so 819012fd133Schristos we can use it to restore LC_CTYPE instead of asking 820012fd133Schristos setlocale() to scan the environment variables. 821012fd133Schristos 822012fd133Schristos2014-02-12 18:21 Christos Zoulas <christos@zoulas.com> 823012fd133Schristos 824012fd133Schristos * Count recursion levels through indirect magic 825012fd133Schristos 826012fd133Schristos2014-02-11 10:40 Christos Zoulas <christos@zoulas.com> 827012fd133Schristos 828012fd133Schristos * Prevent infinite recursion on files with indirect offsets of 0 829012fd133Schristos 830012fd133Schristos2014-01-30 21:00 Christos Zoulas <christos@zoulas.com> 831012fd133Schristos 832012fd133Schristos * Add -E flag that makes file print filesystem errors to stderr 833012fd133Schristos and exit. 834012fd133Schristos 835012fd133Schristos2014-01-08 17:20 Christos Zoulas <christos@zoulas.com> 836012fd133Schristos 837012fd133Schristos * mime printing could print results from multiple magic entries 838012fd133Schristos if there were multiple matches. 839012fd133Schristos * in some cases overflow was not detected when computing offsets 840012fd133Schristos in softmagic. 841012fd133Schristos 842012fd133Schristos2013-12-05 12:00 Christos Zoulas <christos@zoulas.com> 843012fd133Schristos 844012fd133Schristos * use strcasestr() to for cdf strings 845012fd133Schristos * reset to the "C" locale while doing regex operations, or case 846012fd133Schristos insensitive comparisons; this is provisional 847012fd133Schristos 8488df916c0Schristos2013-11-19 20:10 Christos Zoulas <christos@zoulas.com> 8498df916c0Schristos 8508df916c0Schristos * always leave magic file loaded, don't unload for magic_check, etc. 8518df916c0Schristos * fix default encoding to binary instead of unknown which broke recently 8528df916c0Schristos * handle empty and one byte files, less specially so that 8538df916c0Schristos --mime-encoding does not break completely. 8548df916c0Schristos ` 8558df916c0Schristos2013-11-06 14:40 Christos Zoulas <christos@zoulas.com> 8568df916c0Schristos 857051bdd9aSchristos * fix erroneous non-zero exit code from non-existent file and message 8588df916c0Schristos 8598df916c0Schristos2013-10-29 14:25 Christos Zoulas <christos@zoulas.com> 8608df916c0Schristos 8618df916c0Schristos * add CDF MSI file detection (Guy Helmer) 8628df916c0Schristos 8638df916c0Schristos2013-09-03 11:56 Christos Zoulas <christos@zoulas.com> 8648df916c0Schristos 8658df916c0Schristos * Don't mix errors and regular output if there was an error 8668df916c0Schristos * in magic_descriptor() don't close the file and try to restore 8678df916c0Schristos its position 8688df916c0Schristos 8698df916c0Schristos2013-05-30 17:25 Christos Zoulas <christos@zoulas.com> 8708df916c0Schristos 8718df916c0Schristos * Don't treat magic as an error if offset was past EOF (Christoph Biedl) 8728df916c0Schristos 8738df916c0Schristos2013-05-28 17:25 Christos Zoulas <christos@zoulas.com> 8748df916c0Schristos 8758df916c0Schristos * Fix spacing issues in softmagic and elf (Jan Kaluza) 8768df916c0Schristos 8778df916c0Schristos2013-05-02 18:00 Christos Zoulas <christos@zoulas.com> 8788df916c0Schristos 8798df916c0Schristos * Fix segmentation fault with multiple magic_load commands. 8808df916c0Schristos 8818df916c0Schristos2013-04-22 11:20 Christos Zoulas <christos@zoulas.com> 8828df916c0Schristos 8838df916c0Schristos * The way "default" was implemented was not very useful 8848df916c0Schristos because the "if something was printed at that level" 8858df916c0Schristos was not easily controlled by the user, and the format 8868df916c0Schristos was bound to a string which is too restrictive. Add 8878df916c0Schristos a "clear" for that level keyword and make "default" 8888df916c0Schristos void. This way one can do: 8898df916c0Schristos 8908df916c0Schristos >>13 clear x 8918df916c0Schristos >>13 lelong 1 foo 8928df916c0Schristos >>13 lelong 2 bar 8938df916c0Schristos >>13 default x 8948df916c0Schristos >>>13 lelong x unknown %x 8958df916c0Schristos 8968df916c0Schristos2013-03-25 13:20 Christos Zoulas <christos@zoulas.com> 8978df916c0Schristos 8988df916c0Schristos * disallow strength setting in "name" entries 8998df916c0Schristos 90052df37c7Schristos2013-03-06 21:24 Christos Zoulas <christos@zoulas.com> 90152df37c7Schristos 90252df37c7Schristos * fix recursive magic separator printing 90352df37c7Schristos 90452df37c7Schristos2013-02-26 19:28 Christos Zoulas <christos@zoulas.com> 90552df37c7Schristos 90652df37c7Schristos * limit recursion level for mget 90752df37c7Schristos * fix pread() related breakage in cdf 90852df37c7Schristos * handle offsets properly in recursive "use" 90952df37c7Schristos 91052df37c7Schristos2013-02-18 10:39 Christos Zoulas <christos@zoulas.com> 91152df37c7Schristos 91252df37c7Schristos * add elf reading of debug info to determine if file is stripped 91352df37c7Schristos (Jan Kaluza) 91452df37c7Schristos * use pread() 91552df37c7Schristos 91652df37c7Schristos2013-01-25 18:05 Christos Zoulas <christos@zoulas.com> 91752df37c7Schristos 91852df37c7Schristos * change mime description size from 64 to 80 to accommodate OOXML. 91952df37c7Schristos 92052df37c7Schristos2013-01-11 14:50 Christos Zoulas <christos@zoulas.com> 92152df37c7Schristos 92252df37c7Schristos * Warn about inconsistent continuation levels. 92352df37c7Schristos * Change fsmagic to add a space after it prints. 92452df37c7Schristos 92552df37c7Schristos2013-01-10 21:00 Christos Zoulas <christos@zoulas.com> 92652df37c7Schristos 92752df37c7Schristos * Make getline public so that file can link against it. 92852df37c7Schristos Perhaps it is better to rename it, or hide it differently. 92952df37c7Schristos Fixes builds on platforms that do not provide it. 93052df37c7Schristos 93152df37c7Schristos2013-01-07 16:30 Christos Zoulas <christos@zoulas.com> 93252df37c7Schristos 93352df37c7Schristos * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document 93452df37c7Schristos what long, int, short, etc is (Guy Harris) 93552df37c7Schristos 93652df37c7Schristos2013-01-06 11:20 Christos Zoulas <christos@zoulas.com> 93752df37c7Schristos 93852df37c7Schristos * add magic_version function and constant 93952df37c7Schristos * Redo memory allocation and de-allocation. 94052df37c7Schristos (prevents double frees on non mmap platforms) 94152df37c7Schristos * Fix bug with name/use having to do with passing 94252df37c7Schristos found state from the parent to the child and back. 94352df37c7Schristos 9442ae0d66fSchristos2012-12-19 8:47 Christos Zoulas <christos@zoulas.com> 9452ae0d66fSchristos 9462ae0d66fSchristos * Only print elf capabilities for archs we know (Jan Kaluza) 9472ae0d66fSchristos 9482ae0d66fSchristos2012-10-30 19:14 Christos Zoulas <christos@zoulas.com> 9492ae0d66fSchristos 9502ae0d66fSchristos * Add "name" and "use" file types in order to look 9512ae0d66fSchristos inside mach-o files. 9522ae0d66fSchristos 9532ae0d66fSchristos2012-09-06 10:40 Christos Zoulas <christos@zoulas.com> 9542ae0d66fSchristos 9552ae0d66fSchristos * make --version exit 0 (Matthew Schultz) 9562ae0d66fSchristos * add string/T (Jan Kaluza) 9572ae0d66fSchristos 9582ae0d66fSchristos2012-08-09 2:15 Christos Zoulas <christos@zoulas.com> 9592ae0d66fSchristos 9602ae0d66fSchristos * add z and t modifiers for our own vasprintf 9612ae0d66fSchristos * search for $HOME/.magic.mgc if it is there first 9622ae0d66fSchristos * fix reads from a pipe, and preserve errno 9632ae0d66fSchristos 9642ae0d66fSchristos2012-05-15 13:12 Christos Zoulas <christos@zoulas.com> 9652ae0d66fSchristos 9662ae0d66fSchristos * use ctime_r, asctime_r 9672ae0d66fSchristos 9682ae0d66fSchristos2012-04-06 17:18 Christos Zoulas <christos@zoulas.com> 9692ae0d66fSchristos 9702ae0d66fSchristos * Fixes for indirect offsets to handle apple disk formats 9712ae0d66fSchristos 9722ae0d66fSchristos2012-04-03 18:26 Christos Zoulas <christos@zoulas.com> 9732ae0d66fSchristos 9742ae0d66fSchristos * Add windows date field types 9752ae0d66fSchristos * More info for windows shortcuts (incomplete) 9762ae0d66fSchristos 977f50962bcSchristos2012-02-20 17:33 Christos Zoulas <christos@zoulas.com> 978f50962bcSchristos 979f50962bcSchristos * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann) 980f50962bcSchristos 981f50962bcSchristos2011-12-15 12:17 Chris Metcalf <cmetcalf@tilera.com> 982f50962bcSchristos 983f50962bcSchristos * Support Tilera architectures (tile64, tilepro, tilegx). 984f50962bcSchristos 985f50962bcSchristos2011-12-16 16:33 Reuben Thomas <rrt@sc3d.org> 986f50962bcSchristos 987f50962bcSchristos * Add magic for /usr/bin/env Perl scripts 988f50962bcSchristos * Weaken generic script magic to avoid clashing with 989f50962bcSchristos language-specific magic. 990f50962bcSchristos 991f50962bcSchristos2011-12-08 13:37 Reuben Thomas <rrt@sc3d.org> 992f50962bcSchristos 993f50962bcSchristos * Simplify if (p) free(p) to free(p). 994f50962bcSchristos 995f50962bcSchristos2011-12-08 13:07 Reuben Thomas <rrt@sc3d.org> 996f50962bcSchristos 997f50962bcSchristos * Remove hardwired token finding (names.h), turning it into soft 998f50962bcSchristos magic. Patterns are either anchored regexs or search/8192. English 999f50962bcSchristos language detection and PL/1 detection have been removed as they 1000f50962bcSchristos were too fragile. -e tokens is still accepted for backwards 1001f50962bcSchristos compatibility. 1002f50962bcSchristos * Move 3ds patterns (which are commented out anyway) into autodesk 1003f50962bcSchristos (they were, oddly, in c-lang). 1004f50962bcSchristos 1005f50962bcSchristos2011-12-06 00:16 Reuben Thomas <rrt@sc3d.org> 1006f50962bcSchristos 1007f50962bcSchristos * Tweak strength of generic hash-bang detectors to be less than 1008f50962bcSchristos specific ones. 1009f50962bcSchristos * Make an inconsistent description of Python scripts consistent. 1010f50962bcSchristos 1011f50962bcSchristos2011-12-05 23:58 Reuben Thomas <rrt@sc3d.org> 1012f50962bcSchristos 1013f50962bcSchristos * Fix minor error in file(1). 1014f50962bcSchristos 1015f50962bcSchristos2011-11-05 00:00 Reuben Thomas <rrt@sc3d.org> 1016f50962bcSchristos 1017f50962bcSchristos * Fix issue #150 (I hope). 1018f50962bcSchristos 1019f50962bcSchristos2011-09-22 12:57 Christos Zoulas <christos@zoulas.com> 1020f50962bcSchristos 1021f50962bcSchristos * Python3 binding fixes from Kelly Anderson 1022f50962bcSchristos 1023f50962bcSchristos2011-09-20 11:32 Christos Zoulas <christos@zoulas.com> 1024f50962bcSchristos 1025f50962bcSchristos * If a string type magic entry is marked as text or binary 1026f50962bcSchristos only match text files against text entries and binary 1027f50962bcSchristos files against binary entries. 1028f50962bcSchristos 1029f2668affSchristos2011-09-01 12:12 Christos Zoulas <christos@zoulas.com> 1030f2668affSchristos 1031f2668affSchristos * Don't wait for any subprocess, just the one we forked. 1032f2668affSchristos 1033f2668affSchristos2011-08-26 16:40 Christos Zoulas <christos@zoulas.com> 1034f2668affSchristos 1035f2668affSchristos * If the application name is not set in a cdf file, try to see 1036f2668affSchristos if it has a directory with the application name on it. 1037f2668affSchristos 1038f2668affSchristos2011-08-17 14:32 Christos Zoulas <christos@zoulas.com> 1039f2668affSchristos 1040f2668affSchristos * Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza 1041f2668affSchristos 1042f2668affSchristos2011-08-14 09:03 Christos Zoulas <christos@zoulas.com> 1043f2668affSchristos 1044f2668affSchristos * Don't use variable string formats. 1045f2668affSchristos 1046f2668affSchristos2011-07-12 12:32 Reuben Thomas <rrt@sc3d.org> 1047f2668affSchristos 1048f2668affSchristos * Fix detection of Zip files (Mantis #128). 1049f2668affSchristos * Make some minor improvements to file(1). 1050f2668affSchristos * Rename MIME types for filesystem objects for consistency with 1051f2668affSchristos xdg-utils. Typically this means that application/x-foo becomes 1052f2668affSchristos inode/foo, but some names also change slightly, e.g. 1053f2668affSchristos application/x-character-device becomes inode/chardevice. 1054f2668affSchristos 1055f2668affSchristos2011-05-10 20:57 Christos Zoulas <christos@zoulas.com> 1056f2668affSchristos 1057f2668affSchristos * fix mingw compilation (Abradoks) 1058f2668affSchristos 10595ccaa8c0Schristos2011-05-10 20:57 Christos Zoulas <christos@zoulas.com> 10605ccaa8c0Schristos 10615ccaa8c0Schristos * remove patchlevel.h 10625ccaa8c0Schristos * Fix read past allocated memory caused by double-incrementing 10635ccaa8c0Schristos a pointer in a loop (reported by Roberto Maar) 10645ccaa8c0Schristos 10655ccaa8c0Schristos2011-03-30 15:45 Christos Zoulas <christos@zoulas.com> 10665ccaa8c0Schristos 10675ccaa8c0Schristos * Fix cdf string buffer setting (Sven Anders) 10685ccaa8c0Schristos 10695ccaa8c0Schristos2011-03-20 16:35 Christos Zoulas <christos@zoulas.com> 10705ccaa8c0Schristos 10715ccaa8c0Schristos * Eliminate MAXPATHLEN and use dynamic allocation for 10725ccaa8c0Schristos path and file buffers. 10735ccaa8c0Schristos 10745ccaa8c0Schristos2011-03-15 18:15 Christos Zoulas <christos@zoulas.com> 10755ccaa8c0Schristos 10765ccaa8c0Schristos * binary tests on magic entries with masks could spuriously 10775ccaa8c0Schristos get converted to ascii. 10785ccaa8c0Schristos 10795ccaa8c0Schristos2011-03-12 18:06 Reuben Thomas <rrt@sc3d.org> 10805ccaa8c0Schristos 10815ccaa8c0Schristos * Improve file.man (remove BUGS, present email addresses consistently). 10825ccaa8c0Schristos 10835ccaa8c0Schristos2011-03-07 19:38 Christos Zoulas <christos@zoulas.com> 10845ccaa8c0Schristos 10855ccaa8c0Schristos * add lrzip support (from Ville Skytta) 10865ccaa8c0Schristos 10875ccaa8c0Schristos2011-02-10 16:36 Christos Zoulas <christos@zoulas.com> 10885ccaa8c0Schristos 10895ccaa8c0Schristos * fix CDF bounds checking (Guy Helmer) 10905ccaa8c0Schristos 10915ccaa8c0Schristos2011-02-10 12:03 Christos Zoulas <christos@zoulas.com> 10925ccaa8c0Schristos 10935ccaa8c0Schristos * add cdf_ctime() that prints a meaningful error when time cannot 10945ccaa8c0Schristos be converted. 10955ccaa8c0Schristos 10965ccaa8c0Schristos2011-02-02 20:40 Christos Zoulas <christos@zoulas.com> 10975ccaa8c0Schristos 10985ccaa8c0Schristos * help and version output to stdout. 10995ccaa8c0Schristos 11005ccaa8c0Schristos * When matching softmagic for ascii files, don't just print 11015ccaa8c0Schristos the softmagic classification, keep going and print the 11025ccaa8c0Schristos text classification too. This fixes broken troff files when 11035ccaa8c0Schristos we moved them from keyword recognition to softmagic 11045ccaa8c0Schristos (they stopped printing "with CRLF" etc.) 11055ccaa8c0Schristos Reported by Doug McIlroy. 11065ccaa8c0Schristos 11075ccaa8c0Schristos2011-01-16 19:31 Reuben Thomas <rrt@sc3d.org> 11085ccaa8c0Schristos 11095ccaa8c0Schristos * Fix two potential buffer overruns in apprentice_list. 11105ccaa8c0Schristos 11115ccaa8c0Schristos2011-01-14 22:33 Reuben Thomas <rrt@sc3d.org> 11125ccaa8c0Schristos 11135ccaa8c0Schristos * New Python binding in pure Python. 11145ccaa8c0Schristos * Update libmagic(3). 11155ccaa8c0Schristos 11165ccaa8c0Schristos2011-01-06 21:40 Reuben Thomas <rrt@sc3d.org> 11175ccaa8c0Schristos 11185ccaa8c0Schristos * Fix Python bindings (including recent Python 3 compatibility 11195ccaa8c0Schristos update). 11205ccaa8c0Schristos 11215ccaa8c0Schristos2011-01-04 18:43 Reuben Thomas <rrt@sc3d.org> 11225ccaa8c0Schristos 11235ccaa8c0Schristos * magic/Makefile.am: make it easier to recover from magic build failures. 11245ccaa8c0Schristos * Fix pstring length specifier parsing to avoid generating invalid 11255ccaa8c0Schristos magic files. 11265ccaa8c0Schristos * Add pstring length "J" (for "JPEG") to specify that the length 11275ccaa8c0Schristos include itself. 11285ccaa8c0Schristos * Fix JPEG comment parsing at last using pstring/HJ! 11295ccaa8c0Schristos * Ignore section 5 man pages in doc/.cvsignore. 11305ccaa8c0Schristos 11315ccaa8c0Schristos2010-12-22 13:12 Christos Zoulas <christos@zoulas.com> 11325ccaa8c0Schristos 11335ccaa8c0Schristos * Add pstring/BHhLl to specify the type of the length of pascal 11345ccaa8c0Schristos strings. 11355ccaa8c0Schristos 11365ccaa8c0Schristos2010-11-26 18:39 Reuben Thomas <rrt@sc3d.org> 11375ccaa8c0Schristos 11385ccaa8c0Schristos * Fix "-e soft": it was ignored when softmagic was called 11395ccaa8c0Schristos during asciimagic. 11405ccaa8c0Schristos * Improve comments and use "unsigned char" in tar.h/is_tar.c. 11415ccaa8c0Schristos 11425ccaa8c0Schristos2010-11-05 17:26 Reuben Thomas <rrt@sc3d.org> 11435ccaa8c0Schristos 11445ccaa8c0Schristos * Make bug reporting addresses more visible. 11455ccaa8c0Schristos 11465ccaa8c0Schristos2010-11-01 18:35 Reuben Thomas <rrt@sc3d.org> 11475ccaa8c0Schristos 11485ccaa8c0Schristos * Add tcl magic from Gustaf Neumann 11495ccaa8c0Schristos 11505ccaa8c0Schristos2010-10-24 10:42 Christos Zoulas <christos@zoulas.com> 11515ccaa8c0Schristos 11525ccaa8c0Schristos * Fix the whitespace comparing code (Christopher Chittleborough) 11535ccaa8c0Schristos 11545ccaa8c0Schristos2010-10-06 21:05 Christos Zoulas <christos@zoulas.com> 11555ccaa8c0Schristos 11565ccaa8c0Schristos * allow string/t to work (Jan Kaluza) 11575ccaa8c0Schristos 11585ccaa8c0Schristos2010-09-20 22:11 Reuben Thomas <rrt@sc3d.org> 11595ccaa8c0Schristos 11605ccaa8c0Schristos * Apply some patches from Ubuntu and Fedora. 11615ccaa8c0Schristos 11625ccaa8c0Schristos2010-09-20 21:16 Reuben Thomas <rrt@sc3d.org> 11635ccaa8c0Schristos 11645ccaa8c0Schristos * Apply all patches from Debian package 5.04-6 which have not 11655ccaa8c0Schristos already been applied and are not Debian-specific. 11665ccaa8c0Schristos 11675ccaa8c0Schristos2010-09-20 15:24 Reuben Thomas <rrt@sc3d.org> 11685ccaa8c0Schristos 11695ccaa8c0Schristos * Minor security fix to softmagic.c (don't use untrusted 11705ccaa8c0Schristos string as printf format). 11715ccaa8c0Schristos 11725ccaa8c0Schristos2010-07-21 12:20 Christos Zoulas <christos@zoulas.com> 11735ccaa8c0Schristos 11745ccaa8c0Schristos * MINGW32 portability from LRN 11755ccaa8c0Schristos 11765ccaa8c0Schristos * Don't warn about escaping magic regex chars when we are in a regex. 11775ccaa8c0Schristos 11785ccaa8c0Schristos2010-07-19 10:55 Christos Zoulas <christos@zoulas.com> 11795ccaa8c0Schristos 11805ccaa8c0Schristos * Only try to print prpsinfo for core files. (Jan Kaluza) 11815ccaa8c0Schristos 11825ccaa8c0Schristos2010-04-22 12:55 Christos Zoulas <christos@zoulas.com> 11835ccaa8c0Schristos 11845ccaa8c0Schristos * Try more elf offsets for Debian core files. (Arnaud Giersch) 11855ccaa8c0Schristos 11865ccaa8c0Schristos2010-02-20 15:18 Reuben Thomas <rrt@sc3d.org> 11875ccaa8c0Schristos 11885ccaa8c0Schristos * Clarify which sort of CDF we mean. 11895ccaa8c0Schristos 11905ccaa8c0Schristos2010-02-14 22:58 Reuben Thomas <rrt@sc3d.org> 11915ccaa8c0Schristos 11925ccaa8c0Schristos * Re-jig Zip file type magic so that unsupported special 11935ccaa8c0Schristos Zip types (those with "mimetype" at offset 30) can be 11945ccaa8c0Schristos recognized. 11955ccaa8c0Schristos 11965ccaa8c0Schristos2010-02-02 21:50 Reuben Thomas <rrt@sc3d.org> 11975ccaa8c0Schristos 11985ccaa8c0Schristos * Add support for OCF (EPUB) files (application/epub+zip) 11995ccaa8c0Schristos 12005ccaa8c0Schristos2010-01-28 18:25 Christos Zoulas <christos@zoulas.com> 12015ccaa8c0Schristos 12025ccaa8c0Schristos * Fix core-dump from unbound loop: 12035ccaa8c0Schristos https://bugzilla.redhat.com/show_bug.cgi?id=533245 12045ccaa8c0Schristos 12055ccaa8c0Schristos2010-01-22 15:45 Christos Zoulas <christos@zoulas.com> 12065ccaa8c0Schristos 12075ccaa8c0Schristos * print proper mime for crystal reports file 12085ccaa8c0Schristos 12095ccaa8c0Schristos * print the last summary information of a cdf document, not the 12105ccaa8c0Schristos first so that nested documents print the right info 12115ccaa8c0Schristos 12125ccaa8c0Schristos2010-01-16 18:42 Charles Longeau <chl@tuxfamily.org> 12135ccaa8c0Schristos 12145ccaa8c0Schristos * bring back some fixes from OpenBSD: 12155ccaa8c0Schristos - make gcc2 builds file 12165ccaa8c0Schristos - fix typos in a magic file comment 12175ccaa8c0Schristos 12185ccaa8c0Schristos2009-11-17 18:35 Christos Zoulas <christos@zoulas.com> 12195ccaa8c0Schristos 12205ccaa8c0Schristos * ctime/asctime can return NULL on some OS's although 12215ccaa8c0Schristos they should not (Toshit Antani) 12225ccaa8c0Schristos 12235ccaa8c0Schristos2009-09-14 13:49 Christos Zoulas <christos@zoulas.com> 12245ccaa8c0Schristos 12255ccaa8c0Schristos * Centralize magic path handling routines and remove the 12265ccaa8c0Schristos special-casing from file.c so that the python module for 12275ccaa8c0Schristos example comes up with the same magic path (Fixes ~/.magic 12285ccaa8c0Schristos handling) (from Gab) 12295ccaa8c0Schristos 12305ccaa8c0Schristos2009-09-11 23:38 Reuben Thomas <rrt@sc3d.org> 12315ccaa8c0Schristos 12325ccaa8c0Schristos * When magic argument is a directory, read the files in 12335ccaa8c0Schristos strcmp-sorted order (fixes Debian bug #488562 and our own FIXME). 12345ccaa8c0Schristos 12355ccaa8c0Schristos2009-09-11 13:11 Reuben Thomas <rrt@sc3d.org> 12365ccaa8c0Schristos 12375ccaa8c0Schristos * Combine overlapping epoc and psion magic files into one (epoc). 12385ccaa8c0Schristos 12395ccaa8c0Schristos * Add some more EPOC MIME types. 12405ccaa8c0Schristos 12415ccaa8c0Schristos2009-08-19 15:55 Christos Zoulas <christos@zoulas.com> 12425ccaa8c0Schristos 12435ccaa8c0Schristos * Fix 3 bugs (From Ian Darwin): 12445ccaa8c0Schristos - file_showstr could move one past the end of the array 12455ccaa8c0Schristos - parse_apple did not nul terminate the string in the overflow case 12465ccaa8c0Schristos - parse_mime truncated the wrong string in the overflow case 12475ccaa8c0Schristos 12485ccaa8c0Schristos2009-08-12 12:28 Robert Byrnes <byrnes@wildpumpkin.net> 12495ccaa8c0Schristos 12505ccaa8c0Schristos * Include Localstuff when compiling magic. 12515ccaa8c0Schristos 12525ccaa8c0Schristos2009-07-15 10:05 Christos Zoulas <christos@zoulas.com> 12535ccaa8c0Schristos 12545ccaa8c0Schristos * Fix logic for including mygetopts.h 12555ccaa8c0Schristos 12565ccaa8c0Schristos * Make cdf.c compile again with debugging 12575ccaa8c0Schristos 12585ccaa8c0Schristos * Add the necessary field handling for crystal reports files to work 12595ccaa8c0Schristos 12605ccaa8c0Schristos2009-06-23 01:34 Reuben Thomas <rrt@sc3d.org> 12615ccaa8c0Schristos 12625ccaa8c0Schristos * Stop "(if" identifying Lisp files, that's plain dumb! 12635ccaa8c0Schristos 12645ccaa8c0Schristos2009-06-09 22:13 Reuben Thomas <rrt@sc3d.org> 12655ccaa8c0Schristos 12665ccaa8c0Schristos * Add a couple of missing MP3 MIME types. 12675ccaa8c0Schristos 12685ccaa8c0Schristos2009-05-27 23:00 Reuben Thomas <rrt@sc3d.org> 12695ccaa8c0Schristos 12705ccaa8c0Schristos * Add full range of hash-bang tests for Python and Ruby. 12715ccaa8c0Schristos 12725ccaa8c0Schristos * Add MIME types for Python and Ruby scripts. 12735ccaa8c0Schristos 12745ccaa8c0Schristos2009-05-13 10:44 Christos Zoulas <christos@zoulas.com> 12755ccaa8c0Schristos 12765ccaa8c0Schristos * off by one in parsing hw capabilities in elf 12775ccaa8c0Schristos (Cheng Renquan) 12785ccaa8c0Schristos 12795ccaa8c0Schristos2009-05-08 13:40 Christos Zoulas <christos@zoulas.com> 12805ccaa8c0Schristos 12815ccaa8c0Schristos * lint fixes and more from NetBSD 12825ccaa8c0Schristos 12831b108b8bSchristos2009-05-06 10:25 Christos Zoulas <christos@zoulas.com> 12841b108b8bSchristos 12851b108b8bSchristos * Avoid null dereference in cdf code (Drew Yao) 12861b108b8bSchristos 12871b108b8bSchristos * More cdf bounds checks and overflow checks 12881b108b8bSchristos 12891b108b8bSchristos2009-05-01 18:37 Christos Zoulas <christos@zoulas.com> 12901b108b8bSchristos 12911b108b8bSchristos * Buffer overflow fixes from Drew Yao 12921b108b8bSchristos 12931b108b8bSchristos2009-04-30 17:10 Christos Zoulas <christos@zoulas.com> 12941b108b8bSchristos 12951b108b8bSchristos * Fix more cdf lossage. All the documents I have 12961b108b8bSchristos right now print the correct information. 12971b108b8bSchristos 12981b108b8bSchristos2009-03-27 18:43 Christos Zoulas <christos@zoulas.com> 12991b108b8bSchristos 13001b108b8bSchristos * don't print \012- separators in the same magic entry 13011b108b8bSchristos if it consists of multiple magic printing lines. 13021b108b8bSchristos 13031b108b8bSchristos2009-03-23 10:20 Christos Zoulas <christos@zoulas.com> 13041b108b8bSchristos 13051b108b8bSchristos * Avoid file descriptor leak in compress code from 13061b108b8bSchristos (Daniel Novotny) 13071b108b8bSchristos 13081b108b8bSchristos2009-03-18 16:50 Christos Zoulas <christos@zoulas.com> 13091b108b8bSchristos 13101b108b8bSchristos * Allow escaping of relation characters, so that we can say \^[A-Z] 13111b108b8bSchristos and the ^ is not eaten as a relation char. 13121b108b8bSchristos 13131b108b8bSchristos * Fix troff and fortran to their previous glory using 13141b108b8bSchristos regex. This was broken since their removel from ascmagic. 13151b108b8bSchristos 13161b108b8bSchristos2009-03-10 16:50 Christos Zoulas <christos@zoulas.com> 13171b108b8bSchristos 13181b108b8bSchristos * don't use strlen in strndup() (Toby Peterson) 13191b108b8bSchristos 13201b108b8bSchristos2009-03-10 7:45 Christos Zoulas <christos@zoulas.com> 13211b108b8bSchristos 13221b108b8bSchristos * avoid c99 syntax. 13231b108b8bSchristos 13241b108b8bSchristos2009-02-23 15:45 Christos Zoulas <christos@zoulas.com> 13251b108b8bSchristos 13261b108b8bSchristos * make the cdf code use the buffer first if available, 13271b108b8bSchristos and then the fd code. 13281b108b8bSchristos 13291b108b8bSchristos2009-02-13 13:45 Christos Zoulas <christos@zoulas.com> 13301b108b8bSchristos 13311b108b8bSchristos * look for struct option to determine if getopt.h is usable for IRIX. 13321b108b8bSchristos 13331b108b8bSchristos * sanitize cdf document strings 13341b108b8bSchristos 13351b108b8bSchristos2009-02-04 13:25 Christos Zoulas <christos@zoulas.com> 13361b108b8bSchristos 13371b108b8bSchristos * fix OS/2 warnings. 13381b108b8bSchristos 13391b108b8bSchristos2008-12-12 15:50 Christos Zoulas <christos@zoulas.com> 13401b108b8bSchristos 13411b108b8bSchristos * fix initial offset calculation for non 4K sector files 13421b108b8bSchristos 13431b108b8bSchristos * add loop limits to avoid DoS attacks by constructing 13441b108b8bSchristos looping sector references. 13451b108b8bSchristos 13461b108b8bSchristos2008-12-03 13:05 Christos Zoulas <christos@zoulas.com> 13471b108b8bSchristos 13481b108b8bSchristos * fix memory botches on cdf file parsing. 13491b108b8bSchristos 13501b108b8bSchristos * exit with non-zero value for any error, not just for the last 13511b108b8bSchristos file processed. 13521b108b8bSchristos 13531b108b8bSchristos2008-11-09 20:42 Charles Longeau <chl@tuxfamily.org> 13541b108b8bSchristos 13551b108b8bSchristos * Replace all str{cpy,cat} functions with strl{cpy,cat} 13561b108b8bSchristos * Ensure that strl{cpy,cat} are included in libmagic, 13571b108b8bSchristos as needed. 13581b108b8bSchristos 13591b108b8bSchristos2008-11-06 18:18 Christos Zoulas <christos@zoulas.com> 13601b108b8bSchristos 13611b108b8bSchristos * Handle ID3 format files. 13621b108b8bSchristos 13631b108b8bSchristos2008-11-06 23:00 Reuben Thomas <rrt@sc3d.org> 13641b108b8bSchristos 13651b108b8bSchristos * Fix --mime, --mime-type and --mime-encoding under new scheme. 13661b108b8bSchristos 13671b108b8bSchristos * Rename "ascii" to "text" and add "encoding" test. 13681b108b8bSchristos 13691b108b8bSchristos * Return a precise ("utf-16le" or "utf-16be") MIME charset for 13701b108b8bSchristos UTF-16. 13711b108b8bSchristos 13721b108b8bSchristos * Fix error in comment caused by automatic indentation adding 13731b108b8bSchristos words! 13741b108b8bSchristos 13751b108b8bSchristos2008-11-06 10:35 Christos Zoulas <christos@astron.com> 13761b108b8bSchristos 13771b108b8bSchristos * use memchr instead of strchr because the string 13781b108b8bSchristos might not be NUL terminated (Scott MacVicar) 13791b108b8bSchristos 13801b108b8bSchristos2008-11-03 07:31 Reuben Thomas <rrt@sc3d.org> 13811b108b8bSchristos 13821b108b8bSchristos * Fix a printf with a non-literal format string. 13831b108b8bSchristos 13841b108b8bSchristos * Fix formatting and punctuation of help for "--apple". 13851b108b8bSchristos 13861b108b8bSchristos2008-10-30 11:00 Reuben Thomas <rrt@sc3d.org> 13871b108b8bSchristos 13881b108b8bSchristos * Correct words counts in comments of struct magic. 13891b108b8bSchristos 13901b108b8bSchristos * Fix handle_annotation to allow both Apple and MIME types to be 13911b108b8bSchristos printed, and to return correct code if MIME type is 13921b108b8bSchristos printed (1, not 0) or if there's an error (-1 not 1). 13931b108b8bSchristos 13941b108b8bSchristos * Fix output of charset for MIME type (precede with semi-colon; 13951b108b8bSchristos fixes Debian bug #501460). 13961b108b8bSchristos 13971b108b8bSchristos * Fix potential attacks via conversion specifications in magic 13981b108b8bSchristos strings. 13991b108b8bSchristos 14001b108b8bSchristos * Add a FIXME for Debian bug #488562 (magic files should be 14011b108b8bSchristos read in a defined order, by sorting the names). 14021b108b8bSchristos 14031b108b8bSchristos2008-10-18 16:45 Christos Zoulas <christos@astron.com> 14041b108b8bSchristos 14051b108b8bSchristos * Added APPLE file creator/type 14061b108b8bSchristos 14071b108b8bSchristos2008-10-12 10:20 Christos Zoulas <christos@astron.com> 14081b108b8bSchristos 14091b108b8bSchristos * Added CDF parsing 14101b108b8bSchristos 14111b108b8bSchristos2008-10-09 16:40 Christos Zoulas <christos@astron.com> 14121b108b8bSchristos 14131b108b8bSchristos * filesystem and msdos patches (Joerg Jenderek) 14141b108b8bSchristos 14151b108b8bSchristos2008-10-09 13:20 Christos Zoulas <christos@astron.com> 14161b108b8bSchristos 14171b108b8bSchristos * correct --exclude documentation issues: remove troff and fortran 14181b108b8bSchristos and rename "token" to "tokens". (Randy McMurchy) 14191b108b8bSchristos 14201b108b8bSchristos2008-10-01 10:30 Christos Zoulas <christos@astron.com> 14211b108b8bSchristos 14221b108b8bSchristos * Read ~/.magic in addition to the default magic file not instead 14231b108b8bSchristos of, as documented in the man page. 14241b108b8bSchristos 14251b108b8bSchristos2008-09-10 21:30 Reuben Thomas <rrt@sc3d.org> 14261b108b8bSchristos 14271b108b8bSchristos * Comment out graphviz patterns, as they match too many files. 14281b108b8bSchristos 14291b108b8bSchristos2008-08-30 12:54 Christos Zoulas <christos@astron.com> 14301b108b8bSchristos 14311b108b8bSchristos * Don't eat trailing \n in magic enties. 14321b108b8bSchristos 14331b108b8bSchristos * Cast defines to allow compilation using a c++ compiler. 14341b108b8bSchristos 14351b108b8bSchristos2008-08-25 23:56 Reuben Thomas <rrt@sc3d.org> 14361b108b8bSchristos 14371b108b8bSchristos * Add text/x-lua MIME type for Lua scripts. 14381b108b8bSchristos 14391b108b8bSchristos * Escape { in regex in graphviz patterns. 14401b108b8bSchristos 14411b108b8bSchristos2008-07-26 00:59 Reuben Thomas <rrt@sc3d.org> 14421b108b8bSchristos 14431b108b8bSchristos * Add MIME types for special files. 14441b108b8bSchristos 14451b108b8bSchristos * Use access to give more accurate information for files that 14461b108b8bSchristos can't be opened. 14471b108b8bSchristos 14481b108b8bSchristos * Add a TODO list. 14491b108b8bSchristos 14501b108b8bSchristos2008-07-02 11:15 Christos Zoulas <christos@astron.com> 14511b108b8bSchristos 14521b108b8bSchristos * add !:strength op to adjust magic strength (experimental) 14531b108b8bSchristos 14541b108b8bSchristos2008-06-16 21:41 Reuben Thomas <rrt@sc3d.org> 14551b108b8bSchristos 14561b108b8bSchristos * Fix automake error in configure.ac. 14571b108b8bSchristos 14581b108b8bSchristos * Add MIME type for Psion Sketch files. 14591b108b8bSchristos 14601b108b8bSchristos2008-06-05 08:59 Christos Zoulas <christos@astron.com> 14611b108b8bSchristos 14621b108b8bSchristos * Don't print warnings about bad namesize in stripped 14631b108b8bSchristos binaries with PT_NOTE is still there, and the actual 14641b108b8bSchristos note is gone (Jakub Jelinek) 14651b108b8bSchristos 14661b108b8bSchristos2008-05-28 15:12 Robert Byrnes <byrnes@wildpumpkin.net> 14671b108b8bSchristos 14681b108b8bSchristos * magic/Magdir/elf: 14691b108b8bSchristos Note invalid byte order for little-endian SPARC32PLUS. 14701b108b8bSchristos Add SPARC V9 vendor extensions and memory model. 14711b108b8bSchristos 14721b108b8bSchristos * src/elfclass.h: 14731b108b8bSchristos Pass target machine to doshn (for Solaris hardware capabilities). 14741b108b8bSchristos 14751b108b8bSchristos * src/readelf.c (doshn): 14761b108b8bSchristos Add support for Solaris hardware/software capabilities. 14771b108b8bSchristos 14781b108b8bSchristos * src/readelf.h: 14791b108b8bSchristos Ditto. 14801b108b8bSchristos 14811b108b8bSchristos * src/vasprintf.c (dispatch): 14821b108b8bSchristos Add support for ll modifier. 14831b108b8bSchristos 14841b108b8bSchristos2008-05-16 10:25 Christos Zoulas <christos@astron.com> 14851b108b8bSchristos 14861b108b8bSchristos * Fix compiler warnings. 14871b108b8bSchristos 14881b108b8bSchristos * remove stray printf, and fix a vprintf bug. (Martin Dorey) 14891b108b8bSchristos 14901b108b8bSchristos2008-05-06 00:13 Robert Byrnes <byrnes@wildpumpkin.net> 14911b108b8bSchristos 14921b108b8bSchristos * src/Makefile.am: 14931b108b8bSchristos Ensure that getopt_long and [v]asprintf are included in libmagic, 14941b108b8bSchristos as needed. 14951b108b8bSchristos 14961b108b8bSchristos Remove unnecessary EXTRA_DIST. 14971b108b8bSchristos 14981b108b8bSchristos * src/Makefile.in: 14991b108b8bSchristos Rerun automake. 15001b108b8bSchristos 15011b108b8bSchristos * src/vasprintf.c (dispatch): 15021b108b8bSchristos Fix variable precision bug: be sure to step past '*'. 15031b108b8bSchristos 15041b108b8bSchristos * src/vasprintf.c (core): 15051b108b8bSchristos Remove unreachable code. 15061b108b8bSchristos 15071b108b8bSchristos * src/apprentice.c (set_test_type): 15081b108b8bSchristos Add cast to avoid compiler warning. 15091b108b8bSchristos 15101b108b8bSchristos2008-04-22 23:45 Christos Zoulas <christos@astron.com> 15111b108b8bSchristos 15121b108b8bSchristos * Add magic submission guidelines (Abel Cheung) 15131b108b8bSchristos 15141b108b8bSchristos * split msdos and windows magic (Abel Cheung) 15151b108b8bSchristos 15161b108b8bSchristos2008-04-04 11:00 Christos Zoulas <christos@astron.com> 15171b108b8bSchristos 15181b108b8bSchristos * >= <= is not supported, so fix the magic and warn about it. 15191b108b8bSchristos reported by: Thien-Thi Nguyen <ttn@gnuvola.org> 15201b108b8bSchristos 15211b108b8bSchristos2008-03-27 16:16 Robert Byrnes <byrnes@wildpumpkin.net> 15221b108b8bSchristos 15231b108b8bSchristos * src/readelf.c (donote): 15241b108b8bSchristos ELF core file command name/line bug fixes and enhancements: 15251b108b8bSchristos 15261b108b8bSchristos Try larger offsets first to avoid false matches 15271b108b8bSchristos from earlier data that happen to look like strings; 15281b108b8bSchristos this primarily affected SunOS 5.x 32-bit Intel core files. 15291b108b8bSchristos 15301b108b8bSchristos Add support for command line (instead of just short name) 15311b108b8bSchristos for SunOS 5.x. 15321b108b8bSchristos 15331b108b8bSchristos Add information about NT_PSINFO for SunOS 5.x. 15341b108b8bSchristos 15351b108b8bSchristos Only trim whitespace from end of command line. 15361b108b8bSchristos 15371b108b8bSchristos2007-02-11 01:36 Reuben Thomas <rrt@sc3d.org> 15381b108b8bSchristos 15391b108b8bSchristos * Change strength of ! from MULT to 0, as it matches almost 15401b108b8bSchristos anything (Reuben Thomas) 15411b108b8bSchristos 15421b108b8bSchristos * Debian fixes (Reuben Thomas) 15431b108b8bSchristos 15441b108b8bSchristos2007-02-11 00:17 Reuben Thomas <rrt@sc3d.org> 15451b108b8bSchristos 15461b108b8bSchristos * Clarify UTF-8 BOM message (Reuben Thomas) 15471b108b8bSchristos 15481b108b8bSchristos * Add HTML comment to token list in names.h 15491b108b8bSchristos 15501b108b8bSchristos2007-02-04 15:50 Christos Zoulas <christos@astron.com> 15511b108b8bSchristos 15521b108b8bSchristos * Debian fixes (Reuben Thomas) 15531b108b8bSchristos 15541b108b8bSchristos2007-02-04 11:31 Christos Zoulas <christos@astron.com> 15551b108b8bSchristos 15561b108b8bSchristos * !:mime annotations in magic files (Reuben Thomas) 15571b108b8bSchristos 15581b108b8bSchristos2007-01-29 15:35 Christos Zoulas <christos@astron.com> 15591b108b8bSchristos 15601b108b8bSchristos * zero out utime/utimes structs (Gavin Atkinson) 15611b108b8bSchristos 15621b108b8bSchristos2007-01-26 13:45 Christos Zoulas <christos@astron.com> 15631b108b8bSchristos 15641b108b8bSchristos * reduce writable data from Diego "Flameeyes" Petten 15651b108b8bSchristos 15661b108b8bSchristos2007-12-28 15:06 Christos Zoulas <christos@astron.com> 15671b108b8bSchristos 15681b108b8bSchristos * strtof detection 15691b108b8bSchristos 15701b108b8bSchristos * remove bogus regex magic that could cause a DoS 15711b108b8bSchristos 15721b108b8bSchristos * better mismatch version message 15731b108b8bSchristos 15741b108b8bSchristos2007-12-27 11:35 Christos Zoulas <christos@astron.com> 15751b108b8bSchristos 15761b108b8bSchristos * bring back some fixes from OpenBSD 15771b108b8bSchristos 15781b108b8bSchristos * treat ELF dynamic objects as executables 15791b108b8bSchristos 15801b108b8bSchristos * fix gcc warnings 15811b108b8bSchristos 15821b108b8bSchristos2007-12-01 19:55 Christos Zoulas <christos@astron.com> 15831b108b8bSchristos 15841b108b8bSchristos * make sure we have zlib.h and libz to compile the builtin 15851b108b8bSchristos decompress code 15861b108b8bSchristos 15871b108b8bSchristos2007-10-28 20:48 Christos Zoulas <christos@astron.com> 15881b108b8bSchristos 15891b108b8bSchristos * float and double magic support (Behan Webster) 15901b108b8bSchristos 15911b108b8bSchristos2007-10-28 20:48 Christos Zoulas <christos@astron.com> 15921b108b8bSchristos 15931b108b8bSchristos * Convert fortran to a soft test (Reuben Thomas) 15941b108b8bSchristos 15951b108b8bSchristos2007-10-23 5:25 Christos Zoulas <christos@astron.com> 15961b108b8bSchristos 15971b108b8bSchristos * Add --with-filename, and --no-filename (Reuben Thomas) 15981b108b8bSchristos 15991b108b8bSchristos2007-10-23 3:59 Christos Zoulas <christos@astron.com> 16001b108b8bSchristos 16011b108b8bSchristos * Rest of the mime split (Reuben Thomas) 16021b108b8bSchristos 16031b108b8bSchristos * Make usage message generated from the flags so that 16041b108b8bSchristos they stay consistent (Reuben Thomas) 16051b108b8bSchristos 16061b108b8bSchristos2007-10-20 3:06 Christos Zoulas <christos@astron.com> 16071b108b8bSchristos 16081b108b8bSchristos * typo in comment, missing ifdef QUICK, remove unneeded code 16091b108b8bSchristos (Charles Longeau) 16101b108b8bSchristos 16111b108b8bSchristos2007-10-17 3:33 Christos Zoulas <christos@astron.com> 16121b108b8bSchristos 16131b108b8bSchristos * Fix problem printing -\012 in some entries 16141b108b8bSchristos 16151b108b8bSchristos * Separate magic type and encoding flags (Reuben Thomas) 16161b108b8bSchristos 16171b108b8bSchristos2007-10-09 3:55 Christos Zoulas <christos@astron.com> 16181b108b8bSchristos 16191b108b8bSchristos * configure fix for int64 and strndup (Reuben Thomas) 16201b108b8bSchristos 16211b108b8bSchristos2007-09-26 4:45 Christos Zoulas <christos@astron.com> 16221b108b8bSchristos 16231b108b8bSchristos * Add magic_descriptor() function. 16241b108b8bSchristos 16251b108b8bSchristos * Fix regression in elf reading code where the core name was 16261b108b8bSchristos not being printed. 16271b108b8bSchristos 16281b108b8bSchristos * Don't convert NUL's to spaces in {l,b}estring16 (Daniel Dawson) 16291b108b8bSchristos 16301b108b8bSchristos2007-08-19 6:30 Christos Zoulas <christos@astron.com> 16311b108b8bSchristos 16321b108b8bSchristos * Make mime format consistent so that it can 16331b108b8bSchristos be easily parsed: 16341b108b8bSchristos mimetype [charset=character-set] [encoding=encoding-mime-type] 16351b108b8bSchristos 16361b108b8bSchristos Remove spurious extra text from some MIME type printouts 16371b108b8bSchristos (mostly in is_tar). 16381b108b8bSchristos 16391b108b8bSchristos Fix one case where -i produced nothing at all (for a 1-byte file, 16401b108b8bSchristos which is now classed as application/octet-stream). 16411b108b8bSchristos 16421b108b8bSchristos Remove 7/8bit classifications, since they were arbitrary 16431b108b8bSchristos and not based on the file data. 16441b108b8bSchristos 16451b108b8bSchristos This work was done by Reuben Thomas 16461b108b8bSchristos 16471b108b8bSchristos2007-05-24 10:00 Christos Zoulas <christos@astron.com> 16481b108b8bSchristos 16491b108b8bSchristos * Fix another integer overflow (Colin Percival) 16501b108b8bSchristos 16511b108b8bSchristos2007-03-26 13:58 Christos Zoulas <christos@astron.com> 16521b108b8bSchristos 16531b108b8bSchristos * make sure that all of struct magic_set is initialized appropriately 16541b108b8bSchristos (Brett) 16551b108b8bSchristos 16561b108b8bSchristos2007-03-25 17:44 Christos Zoulas <christos@astron.com> 16571b108b8bSchristos 16581b108b8bSchristos * reset left bytes in the buffer (Dmitry V. Levin) 16591b108b8bSchristos 16601b108b8bSchristos * compilation failed with COMPILE_ONLY and ENABLE_CONDITIONALS 16611b108b8bSchristos (Peter Avalos) 16621b108b8bSchristos 16631b108b8bSchristos2007-03-15 10:51 Christos Zoulas <christos@astron.com> 16641b108b8bSchristos 16651b108b8bSchristos * fix fortran and nroff reversed tests (Dmitry V. Levin) 16661b108b8bSchristos 16671b108b8bSchristos * fix exclude option (Dmitry V. Levin) 16681b108b8bSchristos 16691b108b8bSchristos2007-02-08 17:30 Christos Zoulas <christos@astron.com> 16701b108b8bSchristos 16711b108b8bSchristos * fix integer underflow in file_printf which can lead to 16721b108b8bSchristos to exploitable heap overflow (Jean-Sebastien Guay-Lero) 16731b108b8bSchristos 16741b108b8bSchristos2007-02-05 11:35 Christos Zoulas <christos@astron.com> 16751b108b8bSchristos 16761b108b8bSchristos * make socket/pipe reading more robust 16771b108b8bSchristos 16781b108b8bSchristos2007-01-25 16:01 Christos Zoulas <christos@astron.com> 16791b108b8bSchristos 16801b108b8bSchristos * Centralize all the tests in file_buffer. 16811b108b8bSchristos 16821b108b8bSchristos * Add exclude flag. 16831b108b8bSchristos 16841b108b8bSchristos2007-01-18 05:29 Anon Ymous <do@not.spam.me> 16851b108b8bSchristos 16861b108b8bSchristos * Move the "type" detection code from parse() into its own table 16871b108b8bSchristos driven routine. This avoids maintaining multiple lists in 16881b108b8bSchristos file.h. 16891b108b8bSchristos 16901b108b8bSchristos * Add an optional conditional field (ust before the type field). 16911b108b8bSchristos This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is 16921b108b8bSchristos likely to go away. 16931b108b8bSchristos 16941b108b8bSchristos2007-01-16 23:24 Anon Ymous <do@not.spam.me> 16951b108b8bSchristos 16961b108b8bSchristos * Fix an initialization bug in check_mem(). 16971b108b8bSchristos 16981b108b8bSchristos2007-01-16 14:58 Anon Ymous <do@not.spam.me> 16991b108b8bSchristos 17001b108b8bSchristos * Add a "default" type to print a message if nothing previously 17011b108b8bSchristos matched at that level or since the last default at that 17021b108b8bSchristos level. This is useful for setting up switch-like statements. 17031b108b8bSchristos It can also be used to do if/else constructions without a 17041b108b8bSchristos redundant second test. 17051b108b8bSchristos 17061b108b8bSchristos * Fix the "x" special case test so that one can test for that 17071b108b8bSchristos string with "=x". 17081b108b8bSchristos 17091b108b8bSchristos * Allow "search" to search the entire buffer if the "/N" 17101b108b8bSchristos search count is missing. 17111b108b8bSchristos 17121b108b8bSchristos * Make "regex" work! It now starts its search at the 17131b108b8bSchristos specified offset and takes an (optional) "/N" line count to 17141b108b8bSchristos specify the search range; otherwise it searches to the end 17151b108b8bSchristos of the file. The match is now grabbed correctly for format 17161b108b8bSchristos strings and the offset set to the end of the match. 17171b108b8bSchristos 17181b108b8bSchristos * Add a "/s" flag to "regex" and "search" to set the offset to 17191b108b8bSchristos the start of the match. By default the offset is set to the 17201b108b8bSchristos end of the match, as it is with other tests. This is mostly 17211b108b8bSchristos useful for "regex". 17221b108b8bSchristos 17231b108b8bSchristos * Make "search", "string" and "pstring" use the same 17241b108b8bSchristos file_strncmp() routine so that they support the same flags; 17251b108b8bSchristos "bestring16" and "lestring16" call the same routine, but 17261b108b8bSchristos with flags = 0. Also add a "/C" flag (in analogy to "/c") 17271b108b8bSchristos to ignore the case on uppercase (lowercase) characters in 17281b108b8bSchristos the test string. 17291b108b8bSchristos 17301b108b8bSchristos * Strict adherence to C style string escapes. A warnings are 17311b108b8bSchristos printed when compiling. Note: previously "\a" was 17321b108b8bSchristos incorrectly translated to 'a' instead of an <alert> (i.e., 17331b108b8bSchristos BELL, typically 0x07). 17341b108b8bSchristos 17351b108b8bSchristos * Make this compile with "-Wall -Wextra" and all the warning 17361b108b8bSchristos flags used with WARNS=4 in the NetBSD source. Also make it 17371b108b8bSchristos pass lint. 17381b108b8bSchristos 17391b108b8bSchristos * Many "cleanups" and hopefully not too many new bugs! 17401b108b8bSchristos 17411b108b8bSchristos2007-01-16 14:56 Anon Ymous <do@not.spam.me> 17421b108b8bSchristos 17431b108b8bSchristos * make several more files compile with gcc warnings 17441b108b8bSchristos on and also make them pass lint. 17451b108b8bSchristos 17461b108b8bSchristos2007-01-16 14:54 Anon Ymous <do@not.spam.me> 17471b108b8bSchristos 17481b108b8bSchristos * fix a puts()/putc() usage goof in file.c 17491b108b8bSchristos 17501b108b8bSchristos * make file.c compile with gcc warnings and pass lint 17511b108b8bSchristos 17521b108b8bSchristos2006-12-11 16:49 Christos Zoulas <christos@astron.com> 17531b108b8bSchristos 17541b108b8bSchristos * fix byteswapping issue 17551b108b8bSchristos 17561b108b8bSchristos * report the number of bytes we tried to 17571b108b8bSchristos allocate when allocation fails 17581b108b8bSchristos 17591b108b8bSchristos * add a few missed cases in the strength routine 17601b108b8bSchristos 17611b108b8bSchristos2006-12-08 16:32 Christos Zoulas <christos@astron.com> 17621b108b8bSchristos 17631b108b8bSchristos * store and print the line number of the magic 17641b108b8bSchristos entry for debugging. 17651b108b8bSchristos 17661b108b8bSchristos * if the magic entry did not print anything, 17671b108b8bSchristos don't treat it as a match 17681b108b8bSchristos 17691b108b8bSchristos * change the magic strength algorithm to take 17701b108b8bSchristos into account the relationship op. 17711b108b8bSchristos 17721b108b8bSchristos * fix a bug in search where we could accidentally 17731b108b8bSchristos return a match. 17741b108b8bSchristos 17751b108b8bSchristos * propagate the error return from match to 17761b108b8bSchristos file_softmagic. 17771b108b8bSchristos 17781b108b8bSchristos2006-11-25 13:35 Christos Zoulas <christos@astron.com> 17791b108b8bSchristos 17801b108b8bSchristos * Don't store the current offset in the magic 17811b108b8bSchristos struct, because it needs to be restored and 17821b108b8bSchristos it was not done properly all the time. Bug 17831b108b8bSchristos found by: Arkadiusz Miskiewicz 17841b108b8bSchristos 17851b108b8bSchristos * Fix problem in the '\0' separator; and don't 17861b108b8bSchristos print it as an additional separator; print 17871b108b8bSchristos it as the only separator. 17881b108b8bSchristos 17891b108b8bSchristos2006-11-17 10:51 Christos Zoulas <christos@astron.com> 17901b108b8bSchristos 17911b108b8bSchristos * Added a -0 option to print a '\0' separator 17921b108b8bSchristos Etienne Buira <etienne.buira@free.fr> 17931b108b8bSchristos 17941b108b8bSchristos2006-10-31 15:14 Christos Zoulas <christos@astron.com> 17951b108b8bSchristos 17961b108b8bSchristos * Check offset before copying (Mike Frysinger) 17971b108b8bSchristos 17981b108b8bSchristos * merge duplicated code 17991b108b8bSchristos 18001b108b8bSchristos * add quad date support 18011b108b8bSchristos 18021b108b8bSchristos * make sure that we nul terminate desc (Ryoji Kanai) 18031b108b8bSchristos 18041b108b8bSchristos * don't process elf notes multiple times 18051b108b8bSchristos 18061b108b8bSchristos * allow -z to report empty compressed files 18071b108b8bSchristos 18081b108b8bSchristos * use calloc to initialize the ascii buffers (Jos van den Oever) 18091b108b8bSchristos 18101b108b8bSchristos2006-06-08 11:11 Christos Zoulas <christos@astron.com> 18111b108b8bSchristos 18121b108b8bSchristos * QNX fixes (Mike Gorchak) 18131b108b8bSchristos 18141b108b8bSchristos * Add quad support. 18151b108b8bSchristos 18161b108b8bSchristos * FIFO checks (Dr. Werner Fink) 18171b108b8bSchristos 18181b108b8bSchristos * Linux ELF fixes (Dr. Werner Fink) 18191b108b8bSchristos 18201b108b8bSchristos * Magic format checks (Dr. Werner Fink) 18211b108b8bSchristos 1822*ddb17682Schristos * Magic format function improvement (Karl Chen) 18231b108b8bSchristos 18241b108b8bSchristos2006-05-03 11:11 Christos Zoulas <christos@astron.com> 18251b108b8bSchristos 18261b108b8bSchristos * Pick up some elf changes and some constant fixes from SUSE 18271b108b8bSchristos 18281b108b8bSchristos * Identify gnu tar vs. posix tar 18291b108b8bSchristos 1830012fd133Schristos * When keep going, don't print spurious newlines (Radek Vokal) 18311b108b8bSchristos 18321b108b8bSchristos2006-04-01 12:02 Christos Zoulas <christos@astron.com> 18331b108b8bSchristos 18341b108b8bSchristos * Use calloc instead of malloc (Mike Frysinger) 18351b108b8bSchristos 18361b108b8bSchristos * Fix configure script to detect wctypes.h (Mike Frysinger) 18371b108b8bSchristos 18381b108b8bSchristos2006-03-02 16:06 Christos Zoulas <christos@astron.com> 18391b108b8bSchristos 18401b108b8bSchristos * Print empty if the file is (Mike Frysinger) 18411b108b8bSchristos 18421b108b8bSchristos * Don't try to read past the end of the buffer (Mike Frysinger) 18431b108b8bSchristos 18441b108b8bSchristos * Sort magic entries by strength [experimental] 18451b108b8bSchristos 18461b108b8bSchristos2005-11-29 13:26 Christos Zoulas <christos@astron.com> 18471b108b8bSchristos 18481b108b8bSchristos * Use iswprint() to convert the output string. 18491b108b8bSchristos (Bastien Nocera) 18501b108b8bSchristos 18511b108b8bSchristos2005-10-31 8:54 Christos Zoulas <christos@astron.com> 18521b108b8bSchristos 18531b108b8bSchristos * Fix regression where the core info was not completely processed 1854012fd133Schristos (Radek Vokal) 18551b108b8bSchristos 18561b108b8bSchristos2005-10-20 11:15 Christos Zoulas <christos@astron.com> 18571b108b8bSchristos 18581b108b8bSchristos * Middle Endian magic (Diomidis Spinellis) 18591b108b8bSchristos 18601b108b8bSchristos2005-10-17 11:15 Christos Zoulas <christos@astron.com> 18611b108b8bSchristos 18621b108b8bSchristos * Open with O_BINARY for CYGWIN (Corinna Vinschen) 18631b108b8bSchristos 18641b108b8bSchristos * Don't close stdin (Arkadiusz Miskiewicz) 18651b108b8bSchristos 18661b108b8bSchristos * Look for note sections in non executables. 18671b108b8bSchristos 18681b108b8bSchristos2005-09-20 13:33 Christos Zoulas <christos@astron.com> 18691b108b8bSchristos 18701b108b8bSchristos * Don't print SVR4 Style in core files multiple times 1871012fd133Schristos (Radek Vokal) 18721b108b8bSchristos 18731b108b8bSchristos2005-08-27 04:09 Christos Zoulas <christos@astron.com> 18741b108b8bSchristos 18751b108b8bSchristos * Cygwin changes Corinna Vinschen 18761b108b8bSchristos 18771b108b8bSchristos2005-08-18 09:53 Christos Zoulas <christos@astron.com> 18781b108b8bSchristos 18791b108b8bSchristos * Remove erroreous mention of /etc/magic in the file man page 18801b108b8bSchristos This is gentoo bug 101639. (Mike Frysinger) 18811b108b8bSchristos 18821b108b8bSchristos * Cross-compile support and detection (Mike Frysinger) 18831b108b8bSchristos 18841b108b8bSchristos2005-08-12 10:17 Christos Zoulas <christos@astron.com> 18851b108b8bSchristos 18861b108b8bSchristos * Add -h flag and dereference symlinks if POSIXLY_CORRECT 18871b108b8bSchristos is set. 18881b108b8bSchristos 18891b108b8bSchristos2005-07-29 13:57 Christos Zoulas <christos@astron.com> 18901b108b8bSchristos 18911b108b8bSchristos * Avoid search and regex buffer overflows (Kelledin) 18921b108b8bSchristos 18931b108b8bSchristos2005-07-12 11:48 Christos Zoulas <christos@astron.com> 18941b108b8bSchristos 18951b108b8bSchristos * Provide stub implementations for {v,}nsprintf() for older 18961b108b8bSchristos OS's that don't have them. 18971b108b8bSchristos * Change mbstate_t autoconf detection macro from AC_MBSTATE_T 18981b108b8bSchristos to AC_TYPE_MBSTATE_T. 18991b108b8bSchristos 19001b108b8bSchristos2005-06-25 11:48 Christos Zoulas <christos@astron.com> 19011b108b8bSchristos 19021b108b8bSchristos * Dynamically allocate the string buffers and make the 19031b108b8bSchristos default read size 256K. 19041b108b8bSchristos 19051b108b8bSchristos2005-06-01 00:00 Joerg Sonnenberger <joerg@britannica.bec.de> 19061b108b8bSchristos 19071b108b8bSchristos * Dragonfly ELF note support 19081b108b8bSchristos 19091b108b8bSchristos2005-03-14 00:00 Giuliano Bertoletti <gb@symbolic.it> 19101b108b8bSchristos 19111b108b8bSchristos * Avoid NULL pointer dereference in time conversion. 19121b108b8bSchristos 19131b108b8bSchristos2005-03-06 00:00 Joerg Walter <jwalt@mail.garni.ch> 19141b108b8bSchristos 19151b108b8bSchristos * Add indirect magic offset support, and search mode. 19161b108b8bSchristos 19171b108b8bSchristos2005-01-12 00:00 Stepan Kasal <kasal@ucw.cz> 19181b108b8bSchristos 19191b108b8bSchristos * src/ascmagic.c (file_ascmagic): Fix three bugs about text files: 19201b108b8bSchristos If a CRLF text file happens to have CR at offset HOWMANY - 1 19211b108b8bSchristos (currently 0xffff), it should not be counted as CR line 19221b108b8bSchristos terminator. 19231b108b8bSchristos If a line has length exactly MAXLINELEN, it should not yet be 19241b108b8bSchristos treated as a ``very long line'', as MAXLINELEN is ``longest sane 19251b108b8bSchristos line length''. 19261b108b8bSchristos With CRLF, the line length was not computed correctly, and even 19271b108b8bSchristos lines of length MAXLINELEN - 1 were treated as ``very long''. 19281b108b8bSchristos 19291b108b8bSchristos2004-12-07 14:15 Christos Zoulas <christos@astron.com> 19301b108b8bSchristos 19311b108b8bSchristos * bzip2 needs a lot of input buffer space on some files 19321b108b8bSchristos before it can begin uncompressing. This makes file -z 19331b108b8bSchristos fail on some bz2 files. Fix it by giving it a copy of 19341b108b8bSchristos the file descriptor to read as much as it wants if we 19351b108b8bSchristos have access to it. <christos@astron.com> 19361b108b8bSchristos 19371b108b8bSchristos2004-11-24 12:39 Christos Zoulas <christos@astron.com> 19381b108b8bSchristos 19391b108b8bSchristos * Stack smash fix, and ELF more conservative reading. 19401b108b8bSchristos Jakub Bogusz <qboosh@pld-linux.org> 19411b108b8bSchristos 19421b108b8bSchristos2004-11-20 18:50 Christos Zoulas <christos@astron.com> 19431b108b8bSchristos 19441b108b8bSchristos * New FreeBSD version parsing code: 19451b108b8bSchristos Jon Noack <noackjr@alumni.rice.edu> 19461b108b8bSchristos 19471b108b8bSchristos * Hackish support for ucs16 strings <christos@astron.com> 19481b108b8bSchristos 19491b108b8bSchristos2004-11-13 03:07 Christos Zoulas <christos@astron.com> 19501b108b8bSchristos 19511b108b8bSchristos * print the file name and line number in syntax errors. 19521b108b8bSchristos 19531b108b8bSchristos2004 10-12 10:50 Christos Zoulas <christos@astron.com> 19541b108b8bSchristos 19551b108b8bSchristos * Fix stack overwriting on 0 length strings: Tim Waugh 19561b108b8bSchristos <twaugh@redhat.com> Ned Ludd <solar@gentoo.org> 19571b108b8bSchristos 19581b108b8bSchristos2004-09-27 11:30 Christos Zoulas <christos@astron.com> 19591b108b8bSchristos 19601b108b8bSchristos * Remove 3rd and 4th copyright clause; approved by Ian Darwin. 19611b108b8bSchristos 19621b108b8bSchristos * Fix small memory leaks; caught by: Tamas Sarlos 19631b108b8bSchristos <stamas@csillag.ilab.sztaki.hu> 19641b108b8bSchristos 19651b108b8bSchristos2004-07-24 16:33 Christos Zoulas <christos@astron.com> 19661b108b8bSchristos 19671b108b8bSchristos * magic.mime update Danny Milosavljevic <danny.milo@gmx.net> 19681b108b8bSchristos 19691b108b8bSchristos * FreeBSD version update Oliver Eikemeier <eikemeier@fillmore-labs.com> 19701b108b8bSchristos 19711b108b8bSchristos * utime/utimes detection Ian Lance Taylor <ian@wasabisystems.com> 19721b108b8bSchristos 19731b108b8bSchristos * errors reading elf magic Jakub Bogusz <qboosh@pld-linux.org> 19741b108b8bSchristos 19751b108b8bSchristos2004-04-12 10:55 Christos Zoulas <christos@astron.com> 19761b108b8bSchristos 19771b108b8bSchristos * make sure that magic formats match magic types during compilation 19781b108b8bSchristos 19791b108b8bSchristos * fix broken sgi magic file 19801b108b8bSchristos 19811b108b8bSchristos2004-04-06 20:36 Christos Zoulas <christos@astron.com> 19821b108b8bSchristos 19831b108b8bSchristos * detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com> 19841b108b8bSchristos 19851b108b8bSchristos * magic fixes 19861b108b8bSchristos 19871b108b8bSchristos2004-03-22 15:25 Christos Zoulas <christos@astron.com> 19881b108b8bSchristos 19891b108b8bSchristos * Lots of mime fixes 19901b108b8bSchristos (Joerg Ostertag) <ostertag@rechengilde.de> 19911b108b8bSchristos 19921b108b8bSchristos * FreeBSD ELF version handling 19931b108b8bSchristos (Edwin Groothuis) <edwin@mavetju.org> 19941b108b8bSchristos 19951b108b8bSchristos * correct cleanup in all cases; don't just close the file. 19961b108b8bSchristos (Christos Zoulas) <christos@astron.com> 19971b108b8bSchristos 19981b108b8bSchristos * add gettext message catalogue support 19991b108b8bSchristos (Michael Piefel) <piefel@debian.org> 20001b108b8bSchristos 20011b108b8bSchristos * better printout for unreadable files 20021b108b8bSchristos (Michael Piefel) <piefel@debian.org> 20031b108b8bSchristos 20041b108b8bSchristos * compensate for missing MAXPATHLEN 20051b108b8bSchristos (Michael Piefel) <piefel@debian.org> 20061b108b8bSchristos 20071b108b8bSchristos * add wide character string length computation 20081b108b8bSchristos (Michael Piefel) <piefel@debian.org> 20091b108b8bSchristos 20101b108b8bSchristos * Avoid infinite loops caused by bad elf alignments 20111b108b8bSchristos or name and description note sizes. Reported by 20121b108b8bSchristos (Mikael Magnusson) <mmikael@comhem.se> 20131b108b8bSchristos 20141b108b8bSchristos2004-03-09 13:55 Christos Zoulas <christos@astron.com> 20151b108b8bSchristos 20161b108b8bSchristos * Fix possible memory leak on error and add missing regfree 20171b108b8bSchristos (Dmitry V. Levin) <ldv@altlinux.org> 20181b108b8bSchristos 20191b108b8bSchristos2003-12-23 12:12 Christos Zoulas <christos@astron.com> 20201b108b8bSchristos 20211b108b8bSchristos * fix -k flag (Maciej W. Rozycki) 20221b108b8bSchristos 20231b108b8bSchristos2003-11-18 14:10 Christos Zoulas <christos@astron.com> 20241b108b8bSchristos 20251b108b8bSchristos * Try to give us much info as possible on corrupt elf files. 20261b108b8bSchristos (Willy Tarreau) <willy@w.ods.org> 20271b108b8bSchristos * Updated python bindings (Brett Funderburg) 20281b108b8bSchristos <brettf@deepfile.com> 20291b108b8bSchristos 20301b108b8bSchristos2003-11-11 15:03 Christos Zoulas <christos@astron.com> 20311b108b8bSchristos 20321b108b8bSchristos * Include file.h first, because it includes config.h 20331b108b8bSchristos breaks largefile test macros otherwise. 20341b108b8bSchristos (Paul Eggert <eggert@CS.UCLA.EDU> via 20351b108b8bSchristos Lars Hecking <lhecking@nmrc.ie>) 20361b108b8bSchristos 20371b108b8bSchristos2003-10-14 21:39 Christos Zoulas <christos@astron.com> 20381b108b8bSchristos 20391b108b8bSchristos * Python bindings (Brett Funderburg) <brettf@deepfile.com> 20401b108b8bSchristos * Don't lookup past the end of the buffer 20411b108b8bSchristos (Chad Hanson) <chanson@tcs-sec.com> 20421b108b8bSchristos * Add MAGIC_ERROR and api on magic_errno() 20431b108b8bSchristos 20441b108b8bSchristos2003-10-08 12:40 Christos Zoulas <christos@astron.com> 20451b108b8bSchristos 20461b108b8bSchristos * handle error conditions from compile as fatal 20471b108b8bSchristos (Antti Kantee) <pooka@netbsd.org> 20481b108b8bSchristos * handle magic filename parsing sanely 20491b108b8bSchristos * more magic fixes. 20501b108b8bSchristos * fix a memory leak (Illes Marton) <illes.marton@balabit.hu> 20511b108b8bSchristos * describe magic file handling 20521b108b8bSchristos (Bryan Henderson) <bryanh@giraffe-data.com> 20531b108b8bSchristos 20541b108b8bSchristos2003-09-12 15:09 Christos Zoulas <christos@astron.com> 20551b108b8bSchristos 20561b108b8bSchristos * update magic files. 20571b108b8bSchristos * remove largefile support from file.h; it breaks things on most OS's 20581b108b8bSchristos 20591b108b8bSchristos2003-08-10 10:25 Christos Zoulas <christos@astron.com> 20601b108b8bSchristos 20611b108b8bSchristos * fix unmapping'ing of mmaped files. 20621b108b8bSchristos 20631b108b8bSchristos2003-07-10 12:03 Christos Zoulas <christos@astron.com> 20641b108b8bSchristos 20651b108b8bSchristos * don't exit with -1 on error; always exit 1 (Marty Leisner) 20661b108b8bSchristos * restore utimes code. 20671b108b8bSchristos 20681b108b8bSchristos2003-06-10 17:03 Christos Zoulas <christos@astron.com> 20691b108b8bSchristos 20701b108b8bSchristos * make sure we don't access uninitialized memory. 20711b108b8bSchristos * pass lint 20721b108b8bSchristos * #ifdef __cplusplus in magic.h 20731b108b8bSchristos 20741b108b8bSchristos2003-05-25 19:23 Christos Zoulas <christos@astron.com> 20751b108b8bSchristos 20761b108b8bSchristos * rename cvs magic file to revision to deal with 20771b108b8bSchristos case insensitive filesystems. 20781b108b8bSchristos 20791b108b8bSchristos2003-05-23 17:03 Christos Zoulas <christos@astron.com> 20801b108b8bSchristos 20811b108b8bSchristos * documentation fixes from Michael Piefel <piefel@debian.org> 20821b108b8bSchristos * magic fixes (various) 20831b108b8bSchristos * revert basename magic in .mgc name determination 20841b108b8bSchristos * buffer protection in uncompress, 20851b108b8bSchristos signness issues, 20861b108b8bSchristos close files 20871b108b8bSchristos Maciej W. Rozycki <macro@ds2.pg.gda.pl 20881b108b8bSchristos 20891b108b8bSchristos2003-04-21 20:12 Christos Zoulas <christos@astron.com> 20901b108b8bSchristos 20911b108b8bSchristos * fix zsh magic 20921b108b8bSchristos 20931b108b8bSchristos2003-04-04 16:59 Christos Zoulas <christos@astron.com> 20941b108b8bSchristos 20951b108b8bSchristos * fix operand sort order in string. 20961b108b8bSchristos 20971b108b8bSchristos2003-04-02 17:30 Christos Zoulas <christos@astron.com> 20981b108b8bSchristos 20991b108b8bSchristos * cleanup namespace in magic.h 21001b108b8bSchristos 21011b108b8bSchristos2003-04-02 13:50 Christos Zoulas <christos@astron.com> 21021b108b8bSchristos 21031b108b8bSchristos * Magic additions (Alex Ott) 21041b108b8bSchristos * Fix bug that broke VPATH compilation (Peter Breitenlohner) 21051b108b8bSchristos 21061b108b8bSchristos2003-03-28 16:03 Christos Zoulas <christos@astron.com> 21071b108b8bSchristos 21081b108b8bSchristos * remove packed attribute from magic struct. 21091b108b8bSchristos * make the magic struct properly aligned. 21101b108b8bSchristos * bump version number of compiled files to 2. 21111b108b8bSchristos 21121b108b8bSchristos2003-03-27 13:10 Christos Zoulas <christos@astron.com> 21131b108b8bSchristos 21141b108b8bSchristos * separate tar detection and run it before softmagic. 21151b108b8bSchristos * fix reversed symlink test. 21161b108b8bSchristos * fix version printing. 21171b108b8bSchristos * make separator a string instead of a char. 21181b108b8bSchristos * update manual page and sort options. 21191b108b8bSchristos 21201b108b8bSchristos2003-03-26 11:00 Christos Zoulas <christos@astron.com> 21211b108b8bSchristos 21221b108b8bSchristos * Pass lint 21231b108b8bSchristos * make NULL in magic_file mean stdin 21241b108b8bSchristos * Fix "-" argument to file to pass NULL to magic_file 21251b108b8bSchristos * avoid pointer casts by using memcpy 21261b108b8bSchristos * rename magic_buf -> magic_buffer 21271b108b8bSchristos * keep only the first error 21281b108b8bSchristos * manual page: new sentence, new line 21291b108b8bSchristos * fix typo in api function (magic_buf -> magic_buffer) 2130