12021-03-30 20:21 Christos Zoulas <christos@zoulas.com> 2 3 * release 5.40 4 52021-02-05 16:31 Christos Zoulas <christos@zoulas.com> 6 7 * PR/234: Add limit to the number of bytes to scan for encoding 8 * PR/230: Fix /T (trim flag) for regex 9 102021-02-01 12:31 Christos Zoulas <christos@zoulas.com> 11 * PR/77: Trim trailing separator. 12 132020-12-17 15:44 Christos Zoulas <christos@zoulas.com> 14 15 * PR/211: Convert system read errors from corrupt ELF 16 files into human readable error messages 17 182020-12-08 16:24 Christos Zoulas <christos@zoulas.com> 19 20 * fix multithreaded decompression file descriptor issue 21 by using close-on-exec (Denys Vlasenko) 22 232020-06-27 11:58 Christos Zoulas <christos@zoulas.com> 24 25 * Exclude surrogate pairs from utf-8 detection (Michael Liu) 26 272020-06-25 12:53 Christos Zoulas <christos@zoulas.com> 28 29 * Include # to the list of ignored format chars (Werner Fink) 30 312020-06-14 20:02 Christos Zoulas <christos@zoulas.com> 32 33 * release 5.39 34 352020-06-07 20:00 Christos Zoulas <christos@zoulas.com> 36 37 * Remove unused subtype_mime (Steve Grubb) 38 * Remove unused check in okstat (Steve Grubb) 39 * Fix mime-type in elf binaries by making sure $x is set 40 * Fix indirect negative offsets broken by OFFNEGATIVE 41 * Fix GUID equality check 42 * PR/165: Handle empty array and strings in JSON 43 * PR/162: Add --exclude-quiet 44 452020-06-06 15:33 Christos Zoulas <christos@zoulas.com> 46 47 * Fix memory leak in ascmagic (Steve Grubb) 48 492020-06-04 00:21 Christos Zoulas <christos@zoulas.com> 50 51 * Fix string comparison length with ignore whitespace 52 532020-05-31 00:11 Christos Zoulas <christos@zoulas.com> 54 55 * Fix mingwin 64 compilation 56 572020-05-30 23:56 Christos Zoulas <christos@zoulas.com> 58 59 * PR/159: whitelist getpid needed for file_pipe2file() 60 612020-05-09 18:57 Christos Zoulas <christos@zoulas.com> 62 63 * Indicate negative offsets with a flag OFFNEGATIVE 64 so that -0 works. 65 * Introduce "offset" magic type that can be used to 66 detect the file size, and bail on short files. 67 * document DER better in the magic man page. 68 692020-03-11 21:53 Christos Zoulas <christos@zoulas.com> 70 71 * fix memory leaks (SonarQube) 72 732020-03-08 21:33 Christos Zoulas <christos@zoulas.com> 74 75 * fix memory leaks (SonarQube) 76 * rewrite confusing loops (SonarQube) 77 * fix bogus test (SonarQube) 78 * pass a sized buffer to file_fmttime() (SonarQube) 79 80 * fix memory leaks (SonarQube) 81 822020-02-20 15:50 Christos Zoulas <christos@zoulas.com> 83 84 * Don't allow * in printf formats, or the code itself (Christoph Biedl) 85 * Introduce a printf output size checker to avoid DoS attacks 86 872020-02-17 17:22 Christos Zoulas <christos@zoulas.com> 88 89 * Avoid memory leak on error (oss-fuzz) 90 * Check length of string on DER before derefercing and add new types 91 * Add missing DER string (oss-fuzz) 92 932020-02-16 20:45 Christos Zoulas <christos@zoulas.com> 94 95 * Add missing DER types, and debugging 96 972020-02-13 13:10 Christos Zoulas <christos@zoulas.com> 98 99 * PR/140: Avoid abort with hand-crafted magic file (gockelhahn) 100 * PR/139 Avoid DoS in printf with hand-crafted magic file (gockelhahn) 101 * PR/138: Avoid crash with hand-crafted magic file (gockelhahn) 102 1032020-02-12 17:30 Christos Zoulas <christos@zoulas.com> 104 105 * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine) 106 1072019-12-24 14:16 Christos Zoulas <christos@zoulas.com> 108 109 * add guid support 110 1112019-12-16 21:11 Christos Zoulas <christos@zoulas.com> 112 113 * release 5.38 114 1152019-12-15 22:13 Christos Zoulas <christos@zoulas.com> 116 Document changes since the previous release: 117 - Always accept -S (no sandbox) even if we don't support sandboxing 118 - More syscalls elided for sandboxiing 119 - For ELF dynamic means having an interpreter not just PT_DYNAMIC 120 - Check for large ELF session header offset 121 - When saving and restoring a locale, keep the locale name in our 122 own storage. 123 - Add a flag to disable CSV file detection. 124 - Don't pass NULL/0 to memset to appease sanitizers. 125 - Avoid spurious prints when looks for extensions or apple strings 126 in fsmagic. 127 - Add builtin decompressors for xz and and bzip. 128 - Add a limit for the number of CDF elements. 129 - More checks for overflow in CDF. 130 1312019-05-14 22:26 Christos Zoulas <christos@zoulas.com> 132 133 * release 5.37 134 1352019-05-09 22:27 Christos Zoulas <christos@zoulas.com> 136 137 * Make sure that continuation separators are printed 138 with -k within softmagic 139 1402019-05-06 22:27 Christos Zoulas <christos@zoulas.com> 141 142 * Change SIGPIPE saving and restoring during compression to use 143 sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko) 144 * Cache stat(2) calls more to reduce number of calls (Denys Vlasenko) 145 1462019-05-06 17:25 Christos Zoulas <christos@zoulas.com> 147 148 * PR/77: Handle --mime-type and -k correctly. 149 1502019-05-03 15:26 Christos Zoulas <christos@zoulas.com> 151 152 * Switch decompression code to use vfork() because 153 tools like rpmdiff and rpmbuild call libmagic 154 with large process footprints (Denys Vlasenko) 155 1562019-04-07 14:05 Christos Zoulas <christos@zoulas.com> 157 158 * PR/75: --enable-zlib, did not work. 159 1602019-02-27 11:54 Christos Zoulas <christos@zoulas.com> 161 162 * Improve regex efficiency (Michael Schroeder) by: 163 1. Prefixing regex searches with regular search 164 for keywords where possible 165 2. Using memmem(3) where available 166 1672019-02-20 10:16 Christos Zoulas <christos@zoulas.com> 168 169 * release 5.36 170 1712019-02-19 15:30 Christos Zoulas <christos@zoulas.com> 172 173 * Fix cast to use cast macros 174 * Add UCS-32 builtin detection (PR/61) reported by tmc 175 1762019-02-18 18:24 Christos Zoulas <christos@zoulas.com> 177 178 * Fix stack read (PR/62) and write (PR/64) stack overflows 179 reported by spinpx 180 1812018-10-18 19:32 Christos Zoulas <christos@zoulas.com> 182 183 * release 5.35 184 1852018-09-10 20:38 Christos Zoulas <christos@zoulas.com> 186 187 * Add FreeBSD ELF core file support (John Baldwin) 188 1892018-08-20 18:40 Christos Zoulas <christos@zoulas.com> 190 191 * PR/30: Allow all parameter values to be set (don't treat 0 specially) 192 * handle default annotations on the softmagic match instead at the 193 end. 194 1952018-07-25 10:17 Christos Zoulas <christos@zoulas.com> 196 197 * PR/23: Recognize JSON files 198 1992018-07-25 10:17 Christos Zoulas <christos@zoulas.com> 200 201 * PR/18: file --mime-encoding should not print mime-type 202 2032018-07-25 8:50 Christos Zoulas <christos@zoulas.com> 204 205 * release 5.34 206 2072018-06-22 16:38 Christos Zoulas <christos@zoulas.com> 208 209 * Add Quad indirect offsets 210 2112018-05-24 14:10 Christos Zoulas <christos@zoulas.com> 212 213 * Enable parsing of ELF dynamic sections to handle PIE better 214 2152018-04-15 14:52 Christos Zoulas <christos@zoulas.com> 216 217 * release 5.33 218 2192018-02-24 14:50 Christos Zoulas <christos@zoulas.com> 220 221 * extend the support for ${x?:} expansions for magic descriptions 222 2232018-02-21 16:25 Christos Zoulas <christos@zoulas.com> 224 225 * add support for ${x?:} in mime types to handle 226 pie binaries. 227 2282017-11-03 9:23 Christos Zoulas <christos@zoulas.com> 229 230 * add support for negative offsets (offsets from the end of file) 231 2322017-09-26 8:22 Christos Zoulas <christos@zoulas.com> 233 234 * close the file on error when writing magic (Steve Grubb) 235 2362017-09-24 12:02 Christos Zoulas <christos@zoulas.com> 237 238 * seccomp support (Paul Moore) 239 2402017-09-02 11:53 Christos Zoulas <christos@zoulas.com> 241 242 * release 5.32 243 2442017-08-28 16:37 Christos Zoulas <christos@zoulas.com> 245 246 * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) 247 2482017-08-27 03:55 Christos Zoulas <christos@zoulas.com> 249 250 * Fix always true condition (Thomas Jarosch) 251 2522017-05-24 17:30 Christos Zoulas <christos@zoulas.com> 253 254 * pickier parsing of numeric values in magic files. 255 2562017-05-23 17:55 Christos Zoulas <christos@zoulas.com> 257 258 * PR/615 add magic_getflags() 259 2602017-05-23 13:55 Christos Zoulas <christos@zoulas.com> 261 262 * release 5.31 263 2642017-03-17 20:32 Christos Zoulas <christos@zoulas.com> 265 266 * remove trailing spaces from magic files 267 * refactor is_tar 268 * better bounds checks for cdf 269 2702017-02-10 12:24 Christos Zoulas <christos@zoulas.com> 271 272 * release 5.30 273 2742017-02-07 23:27 Christos Zoulas <christos@zoulas.com> 275 276 * If we exceeded the offset in a search return no match 277 (Christoph Biedl) 278 * Be more lenient on corrupt CDF files (Christoph Biedl) 279 2802017-02-04 16:46 Christos Zoulas <christos@zoulas.com> 281 282 * pacify ubsan sign extension (oss-fuzz/524) 283 2842017-02-01 12:42 Christos Zoulas <christos@zoulas.com> 285 286 * off by one in cdf parsing (PR/593) 287 * report debugging sections in elf (PR/591) 288 2892016-11-06 10:52 Christos Zoulas <christos@zoulas.com> 290 291 * Allow @@@ in extensions 292 * Add missing overflow check in der magic (Jonas Wagner) 293 2942016-10-25 10:40 Christos Zoulas <christos@zoulas.com> 295 296 * release 5.29 297 2982016-10-24 11:20 Christos Zoulas <christos@zoulas.com> 299 300 * der getlength overflow (Jonas Wagner) 301 * multiple magic file load failure (Christoph Biedl) 302 3032016-10-17 11:26 Christos Zoulas <christos@zoulas.com> 304 305 * CDF parsing improvements (Guy Helmer) 306 3072016-07-20 7:26 Christos Zoulas <christos@zoulas.com> 308 309 * Add support for signed indirect offsets 310 3112016-07-18 7:41 Christos Zoulas <christos@zoulas.com> 312 313 * cat /dev/null | file - should print empty (Christoph Biedl) 314 3152016-07-05 15:20 Christos Zoulas <christos@zoulas.com> 316 317 * Bump string size from 64 to 96. 318 3192016-06-13 20:20 Christos Zoulas <christos@zoulas.com> 320 321 * PR/556: Fix separators on annotations. 322 3232016-06-13 19:40 Christos Zoulas <christos@zoulas.com> 324 325 * release 5.28 326 * fix leak on allocation failure 327 3282016-06-01 1:20 Christos Zoulas <christos@zoulas.com> 329 330 * PR/555: Avoid overflow for offset > nbytes 331 * PR/550: Segv on DER parsing: 332 - use the correct variable for length 333 - set offset to 0 on failure. 334 3352016-05-13 12:00 Christos Zoulas <christos@zoulas.com> 336 337 * release 5.27 338 3392016-04-18 9:35 Christos Zoulas <christos@zoulas.com> 340 341 * Errors comparing DER entries or computing offsets 342 are just indications of malformed non-DER files. 343 Don't print them. 344 * Offset comparison was off-by-one. 345 * Fix compression code (Werner Fink) 346 * Put new bytes constant in the right file (not the generated one) 347 3482016-04-16 18:34 Christos Zoulas <christos@zoulas.com> 349 350 * release 5.26 351 3522016-03-31 13:50 Christos Zoulas <christos@zoulas.com> 353 354 * make the number of bytes read from files configurable. 355 3562016-03-21 13:40 Christos Zoulas <christos@zoulas.com> 357 358 * Add bounds checks for DER code (discovered by Thomas Jarosch) 359 * Change indirect recursion limit to indirect use count and 360 bump from 15 to 50 to prevent abuse. 361 3622016-03-13 20:39 Christos Zoulas <christos@zoulas.com> 363 364 * Add -00 which prints filename\0description\0 365 3662016-03-01 13:28 Christos Zoulas <christos@zoulas.com> 367 368 * Fix ID3 indirect parsing 369 3702016-01-19 10:18 Christos Zoulas <christos@zoulas.com> 371 372 * add DER parsing capability 373 3742015-11-13 10:35 Christos Zoulas <christos@zoulas.com> 375 376 * provide dprintf(3) for the OS's that don't have it. 377 3782015-11-11 16:25 Christos Zoulas <christos@zoulas.com> 379 380 * redo the compression code report decompression errors 381 3822015-11-10 23:25 Christos Zoulas <christos@zoulas.com> 383 384 * REG_STARTEND code is not working as expected, delete it. 385 3862015-11-09 16:05 Christos Zoulas <christos@zoulas.com> 387 388 * Add zlib support if we have it. 389 3902015-11-05 11:22 Christos Zoulas <christos@zoulas.com> 391 392 * PR/492: compression forking was broken with magic_buffer. 393 3942015-09-16 9:50 Christos Zoulas <christos@zoulas.com> 395 396 * release 5.25 397 3982015-09-11 13:25 Christos Zoulas <christos@zoulas.com> 399 400 * add a limit to the length of regex searches 401 4022015-09-08 9:50 Christos Zoulas <christos@zoulas.com> 403 404 * fix problems with --parameter (Christoph Biedl) 405 4062015-07-11 10:35 Christos Zoulas <christos@zoulas.com> 407 408 * Windows fixes PR/466 (Jason Hood) 409 4102015-07-09 10:35 Christos Zoulas <christos@zoulas.com> 411 412 * release 5.24 413 4142015-06-11 8:52 Christos Zoulas <christos@zoulas.com> 415 416 * redo long option encoding to fix off-by-one in 5.23 417 4182015-06-10 13:50 Christos Zoulas <christos@zoulas.com> 419 420 * release 5.23 421 4222015-06-09 16:10 Christos Zoulas <christos@zoulas.com> 423 424 * Fix issue with regex range for magic with offset 425 * Always return true from mget with USE (success to mget not match 426 indication). Fixes mime evaluation after USE magic 427 * PR/459: Don't insert magic entries to the list if there are parsing 428 errors for them. 429 4302015-06-03 16:00 Christos Zoulas <christos@zoulas.com> 431 432 * PR/455: Add utf-7 encoding 433 4342015-06-03 14:30 Christos Zoulas <christos@zoulas.com> 435 436 * PR/455: Implement -Z, look inside, but don't report on compression 437 * PR/454: Fix allocation error on bad magic. 438 4392015-05-29 10:30 Christos Zoulas <christos@zoulas.com> 440 441 * handle MAGIC_CONTINUE everywhere, not just in softmagic 442 4432015-05-21 14:30 Christos Zoulas <christos@zoulas.com> 444 445 * don't print descriptions for NAME types when mime. 446 4472015-04-09 15:59 Christos Zoulas <christos@zoulas.com> 448 449 * Add --extension to list the known extensions for this file type 450 Idea by Andrew J Roazen 451 4522015-02-14 12:23 Christos Zoulas <christos@zoulas.com> 453 454 * Bump file search buffer size to 1M. 455 4562015-01-09 14:35 Christos Zoulas <christos@zoulas.com> 457 458 * Fix multiple issues with date formats reported by Christoph Biedl: 459 - T_LOCAL meaning was reversed 460 - Arithmetic did not work 461 Also stop adjusting daylight savings for gmt printing. 462 4632015-01-05 13:00 Christos Zoulas <christos@zoulas.com> 464 465 * PR/411: Fix memory corruption from corrupt cdf file. 466 4672015-01-02 15:15 Christos Zoulas <christos@zoulas.com> 468 469 * release 5.22 470 4712015-01-01 12:01 Christos Zoulas <christos@zoulas.com> 472 473 * add indirect relative for TIFF/Exif 474 4752014-12-16 18:10 Christos Zoulas <christos@zoulas.com> 476 477 * restructure elf note printing to avoid repeated messages 478 * add note limit, suggested by Alexander Cherepanov 479 4802014-12-16 16:53 Christos Zoulas <christos@zoulas.com> 481 482 * Bail out on partial pread()'s (Alexander Cherepanov) 483 * Fix incorrect bounds check in file_printable (Alexander Cherepanov) 484 4852014-12-11 20:01 Christos Zoulas <christos@zoulas.com> 486 487 * PR/405: ignore SIGPIPE from uncompress programs 488 * change printable -> file_printable and use it in 489 more places for safety 490 * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP 491 is present print the interpreter name. 492 4932014-12-10 20:01 Christos Zoulas <christos@zoulas.com> 494 495 * release 5.21 496 4972014-11-27 18:40 Christos Zoulas <christos@zoulas.com> 498 499 * Allow setting more parameters from the command line. 500 * Split name/use and indirect magic recursion limits. 501 5022014-11-27 11:12 Christos Zoulas <christos@zoulas.com> 503 504 * Adjust ELF parameters and the default recursion 505 level. 506 * Allow setting the recursion level dynamically. 507 5082014-11-24 8:55 Christos Zoulas <christos@zoulas.com> 509 510 * The following fixes resulted from Thomas Jarosch's fuzzing 511 tests that revealed severe performance issues on pathological 512 input: 513 - limit number of elf program and sections processing 514 - abort elf note processing quickly 515 - reduce the number of recursion levels from 20 to 10 516 - preserve error messages in indirect magic handling 517 518 This is tracked as CVE-2014-8116 and CVE-2014-8117 519 5202014-11-12 10:30 Christos Zoulas <christos@zoulas.com> 521 522 * fix bogus free in the user buffer case. 523 5242014-11-11 12:35 Christos Zoulas <christos@zoulas.com> 525 526 * fix out of bounds read for pascal strings 527 * fix memory leak (not freeing the head of each mlist) 528 5292014-11-07 10:25 Christos Zoulas <christos@zoulas.com> 530 531 * When printing strings from a file, convert them to printable 532 on a byte by byte basis, so that we don't get issues with 533 locale's trying to interpret random byte streams as UTF-8 and 534 having printf error out with EILSEQ. 535 5362014-10-17 11:48 Christos Zoulas <christos@zoulas.com> 537 538 * fix bounds in note reading (Francisco Alonso / Red Hat) 539 5402014-10-11 15:02 Christos Zoulas <christos@zoulas.com> 541 542 * fix autoconf glue for setlocale and locale_t; some OS's 543 have locale_t in xlocale.h 544 5452014-10-10 15:01 Christos Zoulas <christos@zoulas.com> 546 547 * release 5.20 548 5492014-08-17 10:01 Christos Zoulas <christos@zoulas.com> 550 551 * recognize encrypted CDF documents 552 5532014-08-04 9:18 Christos Zoulas <christos@zoulas.com> 554 555 * add magic_load_buffers from Brooks Davis 556 5572014-07-24 16:40 Christos Zoulas <christos@zoulas.com> 558 559 * add thumbs.db support 560 5612014-06-12 12:28 Christos Zoulas <christos@zoulas.com> 562 563 * release 5.19 564 5652014-06-09 9:04 Christos Zoulas <christos@zoulas.com> 566 567 * Misc buffer overruns and missing buffer size tests in cdf parsing 568 (Francisco Alonso, Jan Kaluza) 569 5702014-06-02 14:50 Christos Zoulas <christos@zoulas.com> 571 572 * Enforce limit of 8K on regex searches that have no limits 573 * Allow the l modifier for regex to mean line count. Default 574 to byte count. If line count is specified, assume a max 575 of 80 characters per line to limit the byte count. 576 * Don't allow conversions to be used for dates, allowing 577 the mask field to be used as an offset. 578 5792014-05-30 12:51 Christos Zoulas <christos@zoulas.com> 580 581 * Make the range operator limit the length of the 582 regex search. 583 5842014-05-14 19:23 Christos Zoulas <christos@zoulas.com> 585 586 * PR/347: Windows fixes 587 * PR/352: Hangul word processor recognition 588 * PR/354: Encoding irregularities in text files 589 5902014-05-06 6:12 Christos Zoulas <christos@zoulas.com> 591 592 * Fix uninitialized title in CDF files (Jan Kaluza) 593 5942014-05-04 14:55 Christos Zoulas <christos@zoulas.com> 595 596 * PR/351: Fix compilation of empty files 597 5982014-04-30 17:39 Christos Zoulas <christos@zoulas.com> 599 600 * Fix integer formats: We don't specify 'l' or 601 'h' and 'hh' specifiers anymore, only 'll' for 602 quads and nothing for the rest. This is so that 603 magic writing is simpler. 604 6052014-04-01 15:25 Christos Zoulas <christos@zoulas.com> 606 607 * PR/341: Jan Kaluza, fix memory leak 608 * PR/342: Jan Kaluza, fix out of bounds read 609 6102014-03-28 15:25 Christos Zoulas <christos@zoulas.com> 611 612 * Fix issue with long formats not matching fmtcheck 613 6142014-03-26 11:25 Christos Zoulas <christos@zoulas.com> 615 616 * release 5.18 617 6182014-03-15 17:45 Christos Zoulas <christos@zoulas.com> 619 620 * add fmtcheck(3) for those who don't have it 621 6222014-03-14 15:12 Christos Zoulas <christos@zoulas.com> 623 624 * prevent mime entries from being attached to magic 625 entries with no descriptions 626 627 * adjust magic strength for regex type 628 629 * remove superfluous ascmagic with encoding test 630 6312014-03-06 12:01 Christos Zoulas <christos@zoulas.com> 632 633 * fix regression fix echo -ne "\012\013\014" | file -i - 634 which printed "binary" instead of "application/octet-stream" 635 636 * add size_t overflow check for magic file size 637 6382014-02-27 16:01 Christos Zoulas <christos@zoulas.com> 639 640 * experimental support for matching with CFD CLSID 641 6422014-02-18 13:04 Kimmo Suominen (kimmo@suominen.com) 643 644 * Cache old LC_CTYPE locale before setting it to "C", so 645 we can use it to restore LC_CTYPE instead of asking 646 setlocale() to scan the environment variables. 647 6482014-02-12 18:21 Christos Zoulas <christos@zoulas.com> 649 650 * Count recursion levels through indirect magic 651 6522014-02-11 10:40 Christos Zoulas <christos@zoulas.com> 653 654 * Prevent infinite recursion on files with indirect offsets of 0 655 6562014-01-30 21:00 Christos Zoulas <christos@zoulas.com> 657 658 * Add -E flag that makes file print filesystem errors to stderr 659 and exit. 660 6612014-01-08 17:20 Christos Zoulas <christos@zoulas.com> 662 663 * mime printing could print results from multiple magic entries 664 if there were multiple matches. 665 * in some cases overflow was not detected when computing offsets 666 in softmagic. 667 6682013-12-05 12:00 Christos Zoulas <christos@zoulas.com> 669 670 * use strcasestr() to for cdf strings 671 * reset to the "C" locale while doing regex operations, or case 672 insensitive comparisons; this is provisional 673 6742013-11-19 20:10 Christos Zoulas <christos@zoulas.com> 675 676 * always leave magic file loaded, don't unload for magic_check, etc. 677 * fix default encoding to binary instead of unknown which broke recently 678 * handle empty and one byte files, less specially so that 679 --mime-encoding does not break completely. 680 ` 6812013-11-06 14:40 Christos Zoulas <christos@zoulas.com> 682 683 * fix erroneous non-zero exit code from non-existent file and message 684 6852013-10-29 14:25 Christos Zoulas <christos@zoulas.com> 686 687 * add CDF MSI file detection (Guy Helmer) 688 6892013-09-03 11:56 Christos Zoulas <christos@zoulas.com> 690 691 * Don't mix errors and regular output if there was an error 692 * in magic_descriptor() don't close the file and try to restore 693 its position 694 6952013-05-30 17:25 Christos Zoulas <christos@zoulas.com> 696 697 * Don't treat magic as an error if offset was past EOF (Christoph Biedl) 698 6992013-05-28 17:25 Christos Zoulas <christos@zoulas.com> 700 701 * Fix spacing issues in softmagic and elf (Jan Kaluza) 702 7032013-05-02 18:00 Christos Zoulas <christos@zoulas.com> 704 705 * Fix segmentation fault with multiple magic_load commands. 706 7072013-04-22 11:20 Christos Zoulas <christos@zoulas.com> 708 709 * The way "default" was implemented was not very useful 710 because the "if something was printed at that level" 711 was not easily controlled by the user, and the format 712 was bound to a string which is too restrictive. Add 713 a "clear" for that level keyword and make "default" 714 void. This way one can do: 715 716 >>13 clear x 717 >>13 lelong 1 foo 718 >>13 lelong 2 bar 719 >>13 default x 720 >>>13 lelong x unknown %x 721 7222013-03-25 13:20 Christos Zoulas <christos@zoulas.com> 723 724 * disallow strength setting in "name" entries 725 7262013-03-06 21:24 Christos Zoulas <christos@zoulas.com> 727 728 * fix recursive magic separator printing 729 7302013-02-26 19:28 Christos Zoulas <christos@zoulas.com> 731 732 * limit recursion level for mget 733 * fix pread() related breakage in cdf 734 * handle offsets properly in recursive "use" 735 7362013-02-18 10:39 Christos Zoulas <christos@zoulas.com> 737 738 * add elf reading of debug info to determine if file is stripped 739 (Jan Kaluza) 740 * use pread() 741 7422013-01-25 18:05 Christos Zoulas <christos@zoulas.com> 743 744 * change mime description size from 64 to 80 to accommodate OOXML. 745 7462013-01-11 14:50 Christos Zoulas <christos@zoulas.com> 747 748 * Warn about inconsistent continuation levels. 749 * Change fsmagic to add a space after it prints. 750 7512013-01-10 21:00 Christos Zoulas <christos@zoulas.com> 752 753 * Make getline public so that file can link against it. 754 Perhaps it is better to rename it, or hide it differently. 755 Fixes builds on platforms that do not provide it. 756 7572013-01-07 16:30 Christos Zoulas <christos@zoulas.com> 758 759 * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document 760 what long, int, short, etc is (Guy Harris) 761 7622013-01-06 11:20 Christos Zoulas <christos@zoulas.com> 763 764 * add magic_version function and constant 765 * Redo memory allocation and de-allocation. 766 (prevents double frees on non mmap platforms) 767 * Fix bug with name/use having to do with passing 768 found state from the parent to the child and back. 769 7702012-12-19 8:47 Christos Zoulas <christos@zoulas.com> 771 772 * Only print elf capabilities for archs we know (Jan Kaluza) 773 7742012-10-30 19:14 Christos Zoulas <christos@zoulas.com> 775 776 * Add "name" and "use" file types in order to look 777 inside mach-o files. 778 7792012-09-06 10:40 Christos Zoulas <christos@zoulas.com> 780 781 * make --version exit 0 (Matthew Schultz) 782 * add string/T (Jan Kaluza) 783 7842012-08-09 2:15 Christos Zoulas <christos@zoulas.com> 785 786 * add z and t modifiers for our own vasprintf 787 * search for $HOME/.magic.mgc if it is there first 788 * fix reads from a pipe, and preserve errno 789 7902012-05-15 13:12 Christos Zoulas <christos@zoulas.com> 791 792 * use ctime_r, asctime_r 793 7942012-04-06 17:18 Christos Zoulas <christos@zoulas.com> 795 796 * Fixes for indirect offsets to handle apple disk formats 797 7982012-04-03 18:26 Christos Zoulas <christos@zoulas.com> 799 800 * Add windows date field types 801 * More info for windows shortcuts (incomplete) 802 8032012-02-20 17:33 Christos Zoulas <christos@zoulas.com> 804 805 * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann) 806 8072011-12-15 12:17 Chris Metcalf <cmetcalf@tilera.com> 808 809 * Support Tilera architectures (tile64, tilepro, tilegx). 810 8112011-12-16 16:33 Reuben Thomas <rrt@sc3d.org> 812 813 * Add magic for /usr/bin/env Perl scripts 814 * Weaken generic script magic to avoid clashing with 815 language-specific magic. 816 8172011-12-08 13:37 Reuben Thomas <rrt@sc3d.org> 818 819 * Simplify if (p) free(p) to free(p). 820 8212011-12-08 13:07 Reuben Thomas <rrt@sc3d.org> 822 823 * Remove hardwired token finding (names.h), turning it into soft 824 magic. Patterns are either anchored regexs or search/8192. English 825 language detection and PL/1 detection have been removed as they 826 were too fragile. -e tokens is still accepted for backwards 827 compatibility. 828 * Move 3ds patterns (which are commented out anyway) into autodesk 829 (they were, oddly, in c-lang). 830 8312011-12-06 00:16 Reuben Thomas <rrt@sc3d.org> 832 833 * Tweak strength of generic hash-bang detectors to be less than 834 specific ones. 835 * Make an inconsistent description of Python scripts consistent. 836 8372011-12-05 23:58 Reuben Thomas <rrt@sc3d.org> 838 839 * Fix minor error in file(1). 840 8412011-11-05 00:00 Reuben Thomas <rrt@sc3d.org> 842 843 * Fix issue #150 (I hope). 844 8452011-09-22 12:57 Christos Zoulas <christos@zoulas.com> 846 847 * Python3 binding fixes from Kelly Anderson 848 8492011-09-20 11:32 Christos Zoulas <christos@zoulas.com> 850 851 * If a string type magic entry is marked as text or binary 852 only match text files against text entries and binary 853 files against binary entries. 854 8552011-09-01 12:12 Christos Zoulas <christos@zoulas.com> 856 857 * Don't wait for any subprocess, just the one we forked. 858 8592011-08-26 16:40 Christos Zoulas <christos@zoulas.com> 860 861 * If the application name is not set in a cdf file, try to see 862 if it has a directory with the application name on it. 863 8642011-08-17 14:32 Christos Zoulas <christos@zoulas.com> 865 866 * Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza 867 8682011-08-14 09:03 Christos Zoulas <christos@zoulas.com> 869 870 * Don't use variable string formats. 871 8722011-07-12 12:32 Reuben Thomas <rrt@sc3d.org> 873 874 * Fix detection of Zip files (Mantis #128). 875 * Make some minor improvements to file(1). 876 * Rename MIME types for filesystem objects for consistency with 877 xdg-utils. Typically this means that application/x-foo becomes 878 inode/foo, but some names also change slightly, e.g. 879 application/x-character-device becomes inode/chardevice. 880 8812011-05-10 20:57 Christos Zoulas <christos@zoulas.com> 882 883 * fix mingw compilation (Abradoks) 884 8852011-05-10 20:57 Christos Zoulas <christos@zoulas.com> 886 887 * remove patchlevel.h 888 * Fix read past allocated memory caused by double-incrementing 889 a pointer in a loop (reported by Roberto Maar) 890 8912011-03-30 15:45 Christos Zoulas <christos@zoulas.com> 892 893 * Fix cdf string buffer setting (Sven Anders) 894 8952011-03-20 16:35 Christos Zoulas <christos@zoulas.com> 896 897 * Eliminate MAXPATHLEN and use dynamic allocation for 898 path and file buffers. 899 9002011-03-15 18:15 Christos Zoulas <christos@zoulas.com> 901 902 * binary tests on magic entries with masks could spuriously 903 get converted to ascii. 904 9052011-03-12 18:06 Reuben Thomas <rrt@sc3d.org> 906 907 * Improve file.man (remove BUGS, present email addresses consistently). 908 9092011-03-07 19:38 Christos Zoulas <christos@zoulas.com> 910 911 * add lrzip support (from Ville Skytta) 912 9132011-02-10 16:36 Christos Zoulas <christos@zoulas.com> 914 915 * fix CDF bounds checking (Guy Helmer) 916 9172011-02-10 12:03 Christos Zoulas <christos@zoulas.com> 918 919 * add cdf_ctime() that prints a meaningful error when time cannot 920 be converted. 921 9222011-02-02 20:40 Christos Zoulas <christos@zoulas.com> 923 924 * help and version output to stdout. 925 926 * When matching softmagic for ascii files, don't just print 927 the softmagic classification, keep going and print the 928 text classification too. This fixes broken troff files when 929 we moved them from keyword recognition to softmagic 930 (they stopped printing "with CRLF" etc.) 931 Reported by Doug McIlroy. 932 9332011-01-16 19:31 Reuben Thomas <rrt@sc3d.org> 934 935 * Fix two potential buffer overruns in apprentice_list. 936 9372011-01-14 22:33 Reuben Thomas <rrt@sc3d.org> 938 939 * New Python binding in pure Python. 940 * Update libmagic(3). 941 9422011-01-06 21:40 Reuben Thomas <rrt@sc3d.org> 943 944 * Fix Python bindings (including recent Python 3 compatibility 945 update). 946 9472011-01-04 18:43 Reuben Thomas <rrt@sc3d.org> 948 949 * magic/Makefile.am: make it easier to recover from magic build failures. 950 * Fix pstring length specifier parsing to avoid generating invalid 951 magic files. 952 * Add pstring length "J" (for "JPEG") to specify that the length 953 include itself. 954 * Fix JPEG comment parsing at last using pstring/HJ! 955 * Ignore section 5 man pages in doc/.cvsignore. 956 9572010-12-22 13:12 Christos Zoulas <christos@zoulas.com> 958 959 * Add pstring/BHhLl to specify the type of the length of pascal 960 strings. 961 9622010-11-26 18:39 Reuben Thomas <rrt@sc3d.org> 963 964 * Fix "-e soft": it was ignored when softmagic was called 965 during asciimagic. 966 * Improve comments and use "unsigned char" in tar.h/is_tar.c. 967 9682010-11-05 17:26 Reuben Thomas <rrt@sc3d.org> 969 970 * Make bug reporting addresses more visible. 971 9722010-11-01 18:35 Reuben Thomas <rrt@sc3d.org> 973 974 * Add tcl magic from Gustaf Neumann 975 9762010-10-24 10:42 Christos Zoulas <christos@zoulas.com> 977 978 * Fix the whitespace comparing code (Christopher Chittleborough) 979 9802010-10-06 21:05 Christos Zoulas <christos@zoulas.com> 981 982 * allow string/t to work (Jan Kaluza) 983 9842010-09-20 22:11 Reuben Thomas <rrt@sc3d.org> 985 986 * Apply some patches from Ubuntu and Fedora. 987 9882010-09-20 21:16 Reuben Thomas <rrt@sc3d.org> 989 990 * Apply all patches from Debian package 5.04-6 which have not 991 already been applied and are not Debian-specific. 992 9932010-09-20 15:24 Reuben Thomas <rrt@sc3d.org> 994 995 * Minor security fix to softmagic.c (don't use untrusted 996 string as printf format). 997 9982010-07-21 12:20 Christos Zoulas <christos@zoulas.com> 999 1000 * MINGW32 portability from LRN 1001 1002 * Don't warn about escaping magic regex chars when we are in a regex. 1003 10042010-07-19 10:55 Christos Zoulas <christos@zoulas.com> 1005 1006 * Only try to print prpsinfo for core files. (Jan Kaluza) 1007 10082010-04-22 12:55 Christos Zoulas <christos@zoulas.com> 1009 1010 * Try more elf offsets for Debian core files. (Arnaud Giersch) 1011 10122010-02-20 15:18 Reuben Thomas <rrt@sc3d.org> 1013 1014 * Clarify which sort of CDF we mean. 1015 10162010-02-14 22:58 Reuben Thomas <rrt@sc3d.org> 1017 1018 * Re-jig Zip file type magic so that unsupported special 1019 Zip types (those with "mimetype" at offset 30) can be 1020 recognized. 1021 10222010-02-02 21:50 Reuben Thomas <rrt@sc3d.org> 1023 1024 * Add support for OCF (EPUB) files (application/epub+zip) 1025 10262010-01-28 18:25 Christos Zoulas <christos@zoulas.com> 1027 1028 * Fix core-dump from unbound loop: 1029 https://bugzilla.redhat.com/show_bug.cgi?id=533245 1030 10312010-01-22 15:45 Christos Zoulas <christos@zoulas.com> 1032 1033 * print proper mime for crystal reports file 1034 1035 * print the last summary information of a cdf document, not the 1036 first so that nested documents print the right info 1037 10382010-01-16 18:42 Charles Longeau <chl@tuxfamily.org> 1039 1040 * bring back some fixes from OpenBSD: 1041 - make gcc2 builds file 1042 - fix typos in a magic file comment 1043 10442009-11-17 18:35 Christos Zoulas <christos@zoulas.com> 1045 1046 * ctime/asctime can return NULL on some OS's although 1047 they should not (Toshit Antani) 1048 10492009-09-14 13:49 Christos Zoulas <christos@zoulas.com> 1050 1051 * Centralize magic path handling routines and remove the 1052 special-casing from file.c so that the python module for 1053 example comes up with the same magic path (Fixes ~/.magic 1054 handling) (from Gab) 1055 10562009-09-11 23:38 Reuben Thomas <rrt@sc3d.org> 1057 1058 * When magic argument is a directory, read the files in 1059 strcmp-sorted order (fixes Debian bug #488562 and our own FIXME). 1060 10612009-09-11 13:11 Reuben Thomas <rrt@sc3d.org> 1062 1063 * Combine overlapping epoc and psion magic files into one (epoc). 1064 1065 * Add some more EPOC MIME types. 1066 10672009-08-19 15:55 Christos Zoulas <christos@zoulas.com> 1068 1069 * Fix 3 bugs (From Ian Darwin): 1070 - file_showstr could move one past the end of the array 1071 - parse_apple did not nul terminate the string in the overflow case 1072 - parse_mime truncated the wrong string in the overflow case 1073 10742009-08-12 12:28 Robert Byrnes <byrnes@wildpumpkin.net> 1075 1076 * Include Localstuff when compiling magic. 1077 10782009-07-15 10:05 Christos Zoulas <christos@zoulas.com> 1079 1080 * Fix logic for including mygetopts.h 1081 1082 * Make cdf.c compile again with debugging 1083 1084 * Add the necessary field handling for crystal reports files to work 1085 10862009-06-23 01:34 Reuben Thomas <rrt@sc3d.org> 1087 1088 * Stop "(if" identifying Lisp files, that's plain dumb! 1089 10902009-06-09 22:13 Reuben Thomas <rrt@sc3d.org> 1091 1092 * Add a couple of missing MP3 MIME types. 1093 10942009-05-27 23:00 Reuben Thomas <rrt@sc3d.org> 1095 1096 * Add full range of hash-bang tests for Python and Ruby. 1097 1098 * Add MIME types for Python and Ruby scripts. 1099 11002009-05-13 10:44 Christos Zoulas <christos@zoulas.com> 1101 1102 * off by one in parsing hw capabilities in elf 1103 (Cheng Renquan) 1104 11052009-05-08 13:40 Christos Zoulas <christos@zoulas.com> 1106 1107 * lint fixes and more from NetBSD 1108 11092009-05-06 10:25 Christos Zoulas <christos@zoulas.com> 1110 1111 * Avoid null dereference in cdf code (Drew Yao) 1112 1113 * More cdf bounds checks and overflow checks 1114 11152009-05-01 18:37 Christos Zoulas <christos@zoulas.com> 1116 1117 * Buffer overflow fixes from Drew Yao 1118 11192009-04-30 17:10 Christos Zoulas <christos@zoulas.com> 1120 1121 * Fix more cdf lossage. All the documents I have 1122 right now print the correct information. 1123 11242009-03-27 18:43 Christos Zoulas <christos@zoulas.com> 1125 1126 * don't print \012- separators in the same magic entry 1127 if it consists of multiple magic printing lines. 1128 11292009-03-23 10:20 Christos Zoulas <christos@zoulas.com> 1130 1131 * Avoid file descriptor leak in compress code from 1132 (Daniel Novotny) 1133 11342009-03-18 16:50 Christos Zoulas <christos@zoulas.com> 1135 1136 * Allow escaping of relation characters, so that we can say \^[A-Z] 1137 and the ^ is not eaten as a relation char. 1138 1139 * Fix troff and fortran to their previous glory using 1140 regex. This was broken since their removel from ascmagic. 1141 11422009-03-10 16:50 Christos Zoulas <christos@zoulas.com> 1143 1144 * don't use strlen in strndup() (Toby Peterson) 1145 11462009-03-10 7:45 Christos Zoulas <christos@zoulas.com> 1147 1148 * avoid c99 syntax. 1149 11502009-02-23 15:45 Christos Zoulas <christos@zoulas.com> 1151 1152 * make the cdf code use the buffer first if available, 1153 and then the fd code. 1154 11552009-02-13 13:45 Christos Zoulas <christos@zoulas.com> 1156 1157 * look for struct option to determine if getopt.h is usable for IRIX. 1158 1159 * sanitize cdf document strings 1160 11612009-02-04 13:25 Christos Zoulas <christos@zoulas.com> 1162 1163 * fix OS/2 warnings. 1164 11652008-12-12 15:50 Christos Zoulas <christos@zoulas.com> 1166 1167 * fix initial offset calculation for non 4K sector files 1168 1169 * add loop limits to avoid DoS attacks by constructing 1170 looping sector references. 1171 11722008-12-03 13:05 Christos Zoulas <christos@zoulas.com> 1173 1174 * fix memory botches on cdf file parsing. 1175 1176 * exit with non-zero value for any error, not just for the last 1177 file processed. 1178 11792008-11-09 20:42 Charles Longeau <chl@tuxfamily.org> 1180 1181 * Replace all str{cpy,cat} functions with strl{cpy,cat} 1182 * Ensure that strl{cpy,cat} are included in libmagic, 1183 as needed. 1184 11852008-11-06 18:18 Christos Zoulas <christos@zoulas.com> 1186 1187 * Handle ID3 format files. 1188 11892008-11-06 23:00 Reuben Thomas <rrt@sc3d.org> 1190 1191 * Fix --mime, --mime-type and --mime-encoding under new scheme. 1192 1193 * Rename "ascii" to "text" and add "encoding" test. 1194 1195 * Return a precise ("utf-16le" or "utf-16be") MIME charset for 1196 UTF-16. 1197 1198 * Fix error in comment caused by automatic indentation adding 1199 words! 1200 12012008-11-06 10:35 Christos Zoulas <christos@astron.com> 1202 1203 * use memchr instead of strchr because the string 1204 might not be NUL terminated (Scott MacVicar) 1205 12062008-11-03 07:31 Reuben Thomas <rrt@sc3d.org> 1207 1208 * Fix a printf with a non-literal format string. 1209 1210 * Fix formatting and punctuation of help for "--apple". 1211 12122008-10-30 11:00 Reuben Thomas <rrt@sc3d.org> 1213 1214 * Correct words counts in comments of struct magic. 1215 1216 * Fix handle_annotation to allow both Apple and MIME types to be 1217 printed, and to return correct code if MIME type is 1218 printed (1, not 0) or if there's an error (-1 not 1). 1219 1220 * Fix output of charset for MIME type (precede with semi-colon; 1221 fixes Debian bug #501460). 1222 1223 * Fix potential attacks via conversion specifications in magic 1224 strings. 1225 1226 * Add a FIXME for Debian bug #488562 (magic files should be 1227 read in a defined order, by sorting the names). 1228 12292008-10-18 16:45 Christos Zoulas <christos@astron.com> 1230 1231 * Added APPLE file creator/type 1232 12332008-10-12 10:20 Christos Zoulas <christos@astron.com> 1234 1235 * Added CDF parsing 1236 12372008-10-09 16:40 Christos Zoulas <christos@astron.com> 1238 1239 * filesystem and msdos patches (Joerg Jenderek) 1240 12412008-10-09 13:20 Christos Zoulas <christos@astron.com> 1242 1243 * correct --exclude documentation issues: remove troff and fortran 1244 and rename "token" to "tokens". (Randy McMurchy) 1245 12462008-10-01 10:30 Christos Zoulas <christos@astron.com> 1247 1248 * Read ~/.magic in addition to the default magic file not instead 1249 of, as documented in the man page. 1250 12512008-09-10 21:30 Reuben Thomas <rrt@sc3d.org> 1252 1253 * Comment out graphviz patterns, as they match too many files. 1254 12552008-08-30 12:54 Christos Zoulas <christos@astron.com> 1256 1257 * Don't eat trailing \n in magic enties. 1258 1259 * Cast defines to allow compilation using a c++ compiler. 1260 12612008-08-25 23:56 Reuben Thomas <rrt@sc3d.org> 1262 1263 * Add text/x-lua MIME type for Lua scripts. 1264 1265 * Escape { in regex in graphviz patterns. 1266 12672008-07-26 00:59 Reuben Thomas <rrt@sc3d.org> 1268 1269 * Add MIME types for special files. 1270 1271 * Use access to give more accurate information for files that 1272 can't be opened. 1273 1274 * Add a TODO list. 1275 12762008-07-02 11:15 Christos Zoulas <christos@astron.com> 1277 1278 * add !:strength op to adjust magic strength (experimental) 1279 12802008-06-16 21:41 Reuben Thomas <rrt@sc3d.org> 1281 1282 * Fix automake error in configure.ac. 1283 1284 * Add MIME type for Psion Sketch files. 1285 12862008-06-05 08:59 Christos Zoulas <christos@astron.com> 1287 1288 * Don't print warnings about bad namesize in stripped 1289 binaries with PT_NOTE is still there, and the actual 1290 note is gone (Jakub Jelinek) 1291 12922008-05-28 15:12 Robert Byrnes <byrnes@wildpumpkin.net> 1293 1294 * magic/Magdir/elf: 1295 Note invalid byte order for little-endian SPARC32PLUS. 1296 Add SPARC V9 vendor extensions and memory model. 1297 1298 * src/elfclass.h: 1299 Pass target machine to doshn (for Solaris hardware capabilities). 1300 1301 * src/readelf.c (doshn): 1302 Add support for Solaris hardware/software capabilities. 1303 1304 * src/readelf.h: 1305 Ditto. 1306 1307 * src/vasprintf.c (dispatch): 1308 Add support for ll modifier. 1309 13102008-05-16 10:25 Christos Zoulas <christos@astron.com> 1311 1312 * Fix compiler warnings. 1313 1314 * remove stray printf, and fix a vprintf bug. (Martin Dorey) 1315 13162008-05-06 00:13 Robert Byrnes <byrnes@wildpumpkin.net> 1317 1318 * src/Makefile.am: 1319 Ensure that getopt_long and [v]asprintf are included in libmagic, 1320 as needed. 1321 1322 Remove unnecessary EXTRA_DIST. 1323 1324 * src/Makefile.in: 1325 Rerun automake. 1326 1327 * src/vasprintf.c (dispatch): 1328 Fix variable precision bug: be sure to step past '*'. 1329 1330 * src/vasprintf.c (core): 1331 Remove unreachable code. 1332 1333 * src/apprentice.c (set_test_type): 1334 Add cast to avoid compiler warning. 1335 13362008-04-22 23:45 Christos Zoulas <christos@astron.com> 1337 1338 * Add magic submission guidelines (Abel Cheung) 1339 1340 * split msdos and windows magic (Abel Cheung) 1341 13422008-04-04 11:00 Christos Zoulas <christos@astron.com> 1343 1344 * >= <= is not supported, so fix the magic and warn about it. 1345 reported by: Thien-Thi Nguyen <ttn@gnuvola.org> 1346 13472008-03-27 16:16 Robert Byrnes <byrnes@wildpumpkin.net> 1348 1349 * src/readelf.c (donote): 1350 ELF core file command name/line bug fixes and enhancements: 1351 1352 Try larger offsets first to avoid false matches 1353 from earlier data that happen to look like strings; 1354 this primarily affected SunOS 5.x 32-bit Intel core files. 1355 1356 Add support for command line (instead of just short name) 1357 for SunOS 5.x. 1358 1359 Add information about NT_PSINFO for SunOS 5.x. 1360 1361 Only trim whitespace from end of command line. 1362 13632007-02-11 01:36 Reuben Thomas <rrt@sc3d.org> 1364 1365 * Change strength of ! from MULT to 0, as it matches almost 1366 anything (Reuben Thomas) 1367 1368 * Debian fixes (Reuben Thomas) 1369 13702007-02-11 00:17 Reuben Thomas <rrt@sc3d.org> 1371 1372 * Clarify UTF-8 BOM message (Reuben Thomas) 1373 1374 * Add HTML comment to token list in names.h 1375 13762007-02-04 15:50 Christos Zoulas <christos@astron.com> 1377 1378 * Debian fixes (Reuben Thomas) 1379 13802007-02-04 11:31 Christos Zoulas <christos@astron.com> 1381 1382 * !:mime annotations in magic files (Reuben Thomas) 1383 13842007-01-29 15:35 Christos Zoulas <christos@astron.com> 1385 1386 * zero out utime/utimes structs (Gavin Atkinson) 1387 13882007-01-26 13:45 Christos Zoulas <christos@astron.com> 1389 1390 * reduce writable data from Diego "Flameeyes" Petten 1391 13922007-12-28 15:06 Christos Zoulas <christos@astron.com> 1393 1394 * strtof detection 1395 1396 * remove bogus regex magic that could cause a DoS 1397 1398 * better mismatch version message 1399 14002007-12-27 11:35 Christos Zoulas <christos@astron.com> 1401 1402 * bring back some fixes from OpenBSD 1403 1404 * treat ELF dynamic objects as executables 1405 1406 * fix gcc warnings 1407 14082007-12-01 19:55 Christos Zoulas <christos@astron.com> 1409 1410 * make sure we have zlib.h and libz to compile the builtin 1411 decompress code 1412 14132007-10-28 20:48 Christos Zoulas <christos@astron.com> 1414 1415 * float and double magic support (Behan Webster) 1416 14172007-10-28 20:48 Christos Zoulas <christos@astron.com> 1418 1419 * Convert fortran to a soft test (Reuben Thomas) 1420 14212007-10-23 5:25 Christos Zoulas <christos@astron.com> 1422 1423 * Add --with-filename, and --no-filename (Reuben Thomas) 1424 14252007-10-23 3:59 Christos Zoulas <christos@astron.com> 1426 1427 * Rest of the mime split (Reuben Thomas) 1428 1429 * Make usage message generated from the flags so that 1430 they stay consistent (Reuben Thomas) 1431 14322007-10-20 3:06 Christos Zoulas <christos@astron.com> 1433 1434 * typo in comment, missing ifdef QUICK, remove unneeded code 1435 (Charles Longeau) 1436 14372007-10-17 3:33 Christos Zoulas <christos@astron.com> 1438 1439 * Fix problem printing -\012 in some entries 1440 1441 * Separate magic type and encoding flags (Reuben Thomas) 1442 14432007-10-09 3:55 Christos Zoulas <christos@astron.com> 1444 1445 * configure fix for int64 and strndup (Reuben Thomas) 1446 14472007-09-26 4:45 Christos Zoulas <christos@astron.com> 1448 1449 * Add magic_descriptor() function. 1450 1451 * Fix regression in elf reading code where the core name was 1452 not being printed. 1453 1454 * Don't convert NUL's to spaces in {l,b}estring16 (Daniel Dawson) 1455 14562007-08-19 6:30 Christos Zoulas <christos@astron.com> 1457 1458 * Make mime format consistent so that it can 1459 be easily parsed: 1460 mimetype [charset=character-set] [encoding=encoding-mime-type] 1461 1462 Remove spurious extra text from some MIME type printouts 1463 (mostly in is_tar). 1464 1465 Fix one case where -i produced nothing at all (for a 1-byte file, 1466 which is now classed as application/octet-stream). 1467 1468 Remove 7/8bit classifications, since they were arbitrary 1469 and not based on the file data. 1470 1471 This work was done by Reuben Thomas 1472 14732007-05-24 10:00 Christos Zoulas <christos@astron.com> 1474 1475 * Fix another integer overflow (Colin Percival) 1476 14772007-03-26 13:58 Christos Zoulas <christos@astron.com> 1478 1479 * make sure that all of struct magic_set is initialized appropriately 1480 (Brett) 1481 14822007-03-25 17:44 Christos Zoulas <christos@astron.com> 1483 1484 * reset left bytes in the buffer (Dmitry V. Levin) 1485 1486 * compilation failed with COMPILE_ONLY and ENABLE_CONDITIONALS 1487 (Peter Avalos) 1488 14892007-03-15 10:51 Christos Zoulas <christos@astron.com> 1490 1491 * fix fortran and nroff reversed tests (Dmitry V. Levin) 1492 1493 * fix exclude option (Dmitry V. Levin) 1494 14952007-02-08 17:30 Christos Zoulas <christos@astron.com> 1496 1497 * fix integer underflow in file_printf which can lead to 1498 to exploitable heap overflow (Jean-Sebastien Guay-Lero) 1499 15002007-02-05 11:35 Christos Zoulas <christos@astron.com> 1501 1502 * make socket/pipe reading more robust 1503 15042007-01-25 16:01 Christos Zoulas <christos@astron.com> 1505 1506 * Centralize all the tests in file_buffer. 1507 1508 * Add exclude flag. 1509 15102007-01-18 05:29 Anon Ymous <do@not.spam.me> 1511 1512 * Move the "type" detection code from parse() into its own table 1513 driven routine. This avoids maintaining multiple lists in 1514 file.h. 1515 1516 * Add an optional conditional field (ust before the type field). 1517 This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is 1518 likely to go away. 1519 15202007-01-16 23:24 Anon Ymous <do@not.spam.me> 1521 1522 * Fix an initialization bug in check_mem(). 1523 15242007-01-16 14:58 Anon Ymous <do@not.spam.me> 1525 1526 * Add a "default" type to print a message if nothing previously 1527 matched at that level or since the last default at that 1528 level. This is useful for setting up switch-like statements. 1529 It can also be used to do if/else constructions without a 1530 redundant second test. 1531 1532 * Fix the "x" special case test so that one can test for that 1533 string with "=x". 1534 1535 * Allow "search" to search the entire buffer if the "/N" 1536 search count is missing. 1537 1538 * Make "regex" work! It now starts its search at the 1539 specified offset and takes an (optional) "/N" line count to 1540 specify the search range; otherwise it searches to the end 1541 of the file. The match is now grabbed correctly for format 1542 strings and the offset set to the end of the match. 1543 1544 * Add a "/s" flag to "regex" and "search" to set the offset to 1545 the start of the match. By default the offset is set to the 1546 end of the match, as it is with other tests. This is mostly 1547 useful for "regex". 1548 1549 * Make "search", "string" and "pstring" use the same 1550 file_strncmp() routine so that they support the same flags; 1551 "bestring16" and "lestring16" call the same routine, but 1552 with flags = 0. Also add a "/C" flag (in analogy to "/c") 1553 to ignore the case on uppercase (lowercase) characters in 1554 the test string. 1555 1556 * Strict adherence to C style string escapes. A warnings are 1557 printed when compiling. Note: previously "\a" was 1558 incorrectly translated to 'a' instead of an <alert> (i.e., 1559 BELL, typically 0x07). 1560 1561 * Make this compile with "-Wall -Wextra" and all the warning 1562 flags used with WARNS=4 in the NetBSD source. Also make it 1563 pass lint. 1564 1565 * Many "cleanups" and hopefully not too many new bugs! 1566 15672007-01-16 14:56 Anon Ymous <do@not.spam.me> 1568 1569 * make several more files compile with gcc warnings 1570 on and also make them pass lint. 1571 15722007-01-16 14:54 Anon Ymous <do@not.spam.me> 1573 1574 * fix a puts()/putc() usage goof in file.c 1575 1576 * make file.c compile with gcc warnings and pass lint 1577 15782006-12-11 16:49 Christos Zoulas <christos@astron.com> 1579 1580 * fix byteswapping issue 1581 1582 * report the number of bytes we tried to 1583 allocate when allocation fails 1584 1585 * add a few missed cases in the strength routine 1586 15872006-12-08 16:32 Christos Zoulas <christos@astron.com> 1588 1589 * store and print the line number of the magic 1590 entry for debugging. 1591 1592 * if the magic entry did not print anything, 1593 don't treat it as a match 1594 1595 * change the magic strength algorithm to take 1596 into account the relationship op. 1597 1598 * fix a bug in search where we could accidentally 1599 return a match. 1600 1601 * propagate the error return from match to 1602 file_softmagic. 1603 16042006-11-25 13:35 Christos Zoulas <christos@astron.com> 1605 1606 * Don't store the current offset in the magic 1607 struct, because it needs to be restored and 1608 it was not done properly all the time. Bug 1609 found by: Arkadiusz Miskiewicz 1610 1611 * Fix problem in the '\0' separator; and don't 1612 print it as an additional separator; print 1613 it as the only separator. 1614 16152006-11-17 10:51 Christos Zoulas <christos@astron.com> 1616 1617 * Added a -0 option to print a '\0' separator 1618 Etienne Buira <etienne.buira@free.fr> 1619 16202006-10-31 15:14 Christos Zoulas <christos@astron.com> 1621 1622 * Check offset before copying (Mike Frysinger) 1623 1624 * merge duplicated code 1625 1626 * add quad date support 1627 1628 * make sure that we nul terminate desc (Ryoji Kanai) 1629 1630 * don't process elf notes multiple times 1631 1632 * allow -z to report empty compressed files 1633 1634 * use calloc to initialize the ascii buffers (Jos van den Oever) 1635 16362006-06-08 11:11 Christos Zoulas <christos@astron.com> 1637 1638 * QNX fixes (Mike Gorchak) 1639 1640 * Add quad support. 1641 1642 * FIFO checks (Dr. Werner Fink) 1643 1644 * Linux ELF fixes (Dr. Werner Fink) 1645 1646 * Magic format checks (Dr. Werner Fink) 1647 1648 * Magic format function improvent (Karl Chen) 1649 16502006-05-03 11:11 Christos Zoulas <christos@astron.com> 1651 1652 * Pick up some elf changes and some constant fixes from SUSE 1653 1654 * Identify gnu tar vs. posix tar 1655 1656 * When keep going, don't print spurious newlines (Radek Vokal) 1657 16582006-04-01 12:02 Christos Zoulas <christos@astron.com> 1659 1660 * Use calloc instead of malloc (Mike Frysinger) 1661 1662 * Fix configure script to detect wctypes.h (Mike Frysinger) 1663 16642006-03-02 16:06 Christos Zoulas <christos@astron.com> 1665 1666 * Print empty if the file is (Mike Frysinger) 1667 1668 * Don't try to read past the end of the buffer (Mike Frysinger) 1669 1670 * Sort magic entries by strength [experimental] 1671 16722005-11-29 13:26 Christos Zoulas <christos@astron.com> 1673 1674 * Use iswprint() to convert the output string. 1675 (Bastien Nocera) 1676 16772005-10-31 8:54 Christos Zoulas <christos@astron.com> 1678 1679 * Fix regression where the core info was not completely processed 1680 (Radek Vokal) 1681 16822005-10-20 11:15 Christos Zoulas <christos@astron.com> 1683 1684 * Middle Endian magic (Diomidis Spinellis) 1685 16862005-10-17 11:15 Christos Zoulas <christos@astron.com> 1687 1688 * Open with O_BINARY for CYGWIN (Corinna Vinschen) 1689 1690 * Don't close stdin (Arkadiusz Miskiewicz) 1691 1692 * Look for note sections in non executables. 1693 16942005-09-20 13:33 Christos Zoulas <christos@astron.com> 1695 1696 * Don't print SVR4 Style in core files multiple times 1697 (Radek Vokal) 1698 16992005-08-27 04:09 Christos Zoulas <christos@astron.com> 1700 1701 * Cygwin changes Corinna Vinschen 1702 17032005-08-18 09:53 Christos Zoulas <christos@astron.com> 1704 1705 * Remove erroreous mention of /etc/magic in the file man page 1706 This is gentoo bug 101639. (Mike Frysinger) 1707 1708 * Cross-compile support and detection (Mike Frysinger) 1709 17102005-08-12 10:17 Christos Zoulas <christos@astron.com> 1711 1712 * Add -h flag and dereference symlinks if POSIXLY_CORRECT 1713 is set. 1714 17152005-07-29 13:57 Christos Zoulas <christos@astron.com> 1716 1717 * Avoid search and regex buffer overflows (Kelledin) 1718 17192005-07-12 11:48 Christos Zoulas <christos@astron.com> 1720 1721 * Provide stub implementations for {v,}nsprintf() for older 1722 OS's that don't have them. 1723 * Change mbstate_t autoconf detection macro from AC_MBSTATE_T 1724 to AC_TYPE_MBSTATE_T. 1725 17262005-06-25 11:48 Christos Zoulas <christos@astron.com> 1727 1728 * Dynamically allocate the string buffers and make the 1729 default read size 256K. 1730 17312005-06-01 00:00 Joerg Sonnenberger <joerg@britannica.bec.de> 1732 1733 * Dragonfly ELF note support 1734 17352005-03-14 00:00 Giuliano Bertoletti <gb@symbolic.it> 1736 1737 * Avoid NULL pointer dereference in time conversion. 1738 17392005-03-06 00:00 Joerg Walter <jwalt@mail.garni.ch> 1740 1741 * Add indirect magic offset support, and search mode. 1742 17432005-01-12 00:00 Stepan Kasal <kasal@ucw.cz> 1744 1745 * src/ascmagic.c (file_ascmagic): Fix three bugs about text files: 1746 If a CRLF text file happens to have CR at offset HOWMANY - 1 1747 (currently 0xffff), it should not be counted as CR line 1748 terminator. 1749 If a line has length exactly MAXLINELEN, it should not yet be 1750 treated as a ``very long line'', as MAXLINELEN is ``longest sane 1751 line length''. 1752 With CRLF, the line length was not computed correctly, and even 1753 lines of length MAXLINELEN - 1 were treated as ``very long''. 1754 17552004-12-07 14:15 Christos Zoulas <christos@astron.com> 1756 1757 * bzip2 needs a lot of input buffer space on some files 1758 before it can begin uncompressing. This makes file -z 1759 fail on some bz2 files. Fix it by giving it a copy of 1760 the file descriptor to read as much as it wants if we 1761 have access to it. <christos@astron.com> 1762 17632004-11-24 12:39 Christos Zoulas <christos@astron.com> 1764 1765 * Stack smash fix, and ELF more conservative reading. 1766 Jakub Bogusz <qboosh@pld-linux.org> 1767 17682004-11-20 18:50 Christos Zoulas <christos@astron.com> 1769 1770 * New FreeBSD version parsing code: 1771 Jon Noack <noackjr@alumni.rice.edu> 1772 1773 * Hackish support for ucs16 strings <christos@astron.com> 1774 17752004-11-13 03:07 Christos Zoulas <christos@astron.com> 1776 1777 * print the file name and line number in syntax errors. 1778 17792004 10-12 10:50 Christos Zoulas <christos@astron.com> 1780 1781 * Fix stack overwriting on 0 length strings: Tim Waugh 1782 <twaugh@redhat.com> Ned Ludd <solar@gentoo.org> 1783 17842004-09-27 11:30 Christos Zoulas <christos@astron.com> 1785 1786 * Remove 3rd and 4th copyright clause; approved by Ian Darwin. 1787 1788 * Fix small memory leaks; caught by: Tamas Sarlos 1789 <stamas@csillag.ilab.sztaki.hu> 1790 17912004-07-24 16:33 Christos Zoulas <christos@astron.com> 1792 1793 * magic.mime update Danny Milosavljevic <danny.milo@gmx.net> 1794 1795 * FreeBSD version update Oliver Eikemeier <eikemeier@fillmore-labs.com> 1796 1797 * utime/utimes detection Ian Lance Taylor <ian@wasabisystems.com> 1798 1799 * errors reading elf magic Jakub Bogusz <qboosh@pld-linux.org> 1800 18012004-04-12 10:55 Christos Zoulas <christos@astron.com> 1802 1803 * make sure that magic formats match magic types during compilation 1804 1805 * fix broken sgi magic file 1806 18072004-04-06 20:36 Christos Zoulas <christos@astron.com> 1808 1809 * detect present of mbstate_t Petter Reinholdtsen <pere@hungry.com> 1810 1811 * magic fixes 1812 18132004-03-22 15:25 Christos Zoulas <christos@astron.com> 1814 1815 * Lots of mime fixes 1816 (Joerg Ostertag) <ostertag@rechengilde.de> 1817 1818 * FreeBSD ELF version handling 1819 (Edwin Groothuis) <edwin@mavetju.org> 1820 1821 * correct cleanup in all cases; don't just close the file. 1822 (Christos Zoulas) <christos@astron.com> 1823 1824 * add gettext message catalogue support 1825 (Michael Piefel) <piefel@debian.org> 1826 1827 * better printout for unreadable files 1828 (Michael Piefel) <piefel@debian.org> 1829 1830 * compensate for missing MAXPATHLEN 1831 (Michael Piefel) <piefel@debian.org> 1832 1833 * add wide character string length computation 1834 (Michael Piefel) <piefel@debian.org> 1835 1836 * Avoid infinite loops caused by bad elf alignments 1837 or name and description note sizes. Reported by 1838 (Mikael Magnusson) <mmikael@comhem.se> 1839 18402004-03-09 13:55 Christos Zoulas <christos@astron.com> 1841 1842 * Fix possible memory leak on error and add missing regfree 1843 (Dmitry V. Levin) <ldv@altlinux.org> 1844 18452003-12-23 12:12 Christos Zoulas <christos@astron.com> 1846 1847 * fix -k flag (Maciej W. Rozycki) 1848 18492003-11-18 14:10 Christos Zoulas <christos@astron.com> 1850 1851 * Try to give us much info as possible on corrupt elf files. 1852 (Willy Tarreau) <willy@w.ods.org> 1853 * Updated python bindings (Brett Funderburg) 1854 <brettf@deepfile.com> 1855 18562003-11-11 15:03 Christos Zoulas <christos@astron.com> 1857 1858 * Include file.h first, because it includes config.h 1859 breaks largefile test macros otherwise. 1860 (Paul Eggert <eggert@CS.UCLA.EDU> via 1861 Lars Hecking <lhecking@nmrc.ie>) 1862 18632003-10-14 21:39 Christos Zoulas <christos@astron.com> 1864 1865 * Python bindings (Brett Funderburg) <brettf@deepfile.com> 1866 * Don't lookup past the end of the buffer 1867 (Chad Hanson) <chanson@tcs-sec.com> 1868 * Add MAGIC_ERROR and api on magic_errno() 1869 18702003-10-08 12:40 Christos Zoulas <christos@astron.com> 1871 1872 * handle error conditions from compile as fatal 1873 (Antti Kantee) <pooka@netbsd.org> 1874 * handle magic filename parsing sanely 1875 * more magic fixes. 1876 * fix a memory leak (Illes Marton) <illes.marton@balabit.hu> 1877 * describe magic file handling 1878 (Bryan Henderson) <bryanh@giraffe-data.com> 1879 18802003-09-12 15:09 Christos Zoulas <christos@astron.com> 1881 1882 * update magic files. 1883 * remove largefile support from file.h; it breaks things on most OS's 1884 18852003-08-10 10:25 Christos Zoulas <christos@astron.com> 1886 1887 * fix unmapping'ing of mmaped files. 1888 18892003-07-10 12:03 Christos Zoulas <christos@astron.com> 1890 1891 * don't exit with -1 on error; always exit 1 (Marty Leisner) 1892 * restore utimes code. 1893 18942003-06-10 17:03 Christos Zoulas <christos@astron.com> 1895 1896 * make sure we don't access uninitialized memory. 1897 * pass lint 1898 * #ifdef __cplusplus in magic.h 1899 19002003-05-25 19:23 Christos Zoulas <christos@astron.com> 1901 1902 * rename cvs magic file to revision to deal with 1903 case insensitive filesystems. 1904 19052003-05-23 17:03 Christos Zoulas <christos@astron.com> 1906 1907 * documentation fixes from Michael Piefel <piefel@debian.org> 1908 * magic fixes (various) 1909 * revert basename magic in .mgc name determination 1910 * buffer protection in uncompress, 1911 signness issues, 1912 close files 1913 Maciej W. Rozycki <macro@ds2.pg.gda.pl 1914 19152003-04-21 20:12 Christos Zoulas <christos@astron.com> 1916 1917 * fix zsh magic 1918 19192003-04-04 16:59 Christos Zoulas <christos@astron.com> 1920 1921 * fix operand sort order in string. 1922 19232003-04-02 17:30 Christos Zoulas <christos@astron.com> 1924 1925 * cleanup namespace in magic.h 1926 19272003-04-02 13:50 Christos Zoulas <christos@astron.com> 1928 1929 * Magic additions (Alex Ott) 1930 * Fix bug that broke VPATH compilation (Peter Breitenlohner) 1931 19322003-03-28 16:03 Christos Zoulas <christos@astron.com> 1933 1934 * remove packed attribute from magic struct. 1935 * make the magic struct properly aligned. 1936 * bump version number of compiled files to 2. 1937 19382003-03-27 13:10 Christos Zoulas <christos@astron.com> 1939 1940 * separate tar detection and run it before softmagic. 1941 * fix reversed symlink test. 1942 * fix version printing. 1943 * make separator a string instead of a char. 1944 * update manual page and sort options. 1945 19462003-03-26 11:00 Christos Zoulas <christos@astron.com> 1947 1948 * Pass lint 1949 * make NULL in magic_file mean stdin 1950 * Fix "-" argument to file to pass NULL to magic_file 1951 * avoid pointer casts by using memcpy 1952 * rename magic_buf -> magic_buffer 1953 * keep only the first error 1954 * manual page: new sentence, new line 1955 * fix typo in api function (magic_buf -> magic_buffer) 1956