Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | From: Dirk Mueller: | Christos Zoulas | 2022-04-18 | 4 | -46/+24 |
| | | | | | | | | | Only regcomp() can return an error, regexec() only returns match or no-match. This allows to merge file_regerror into file_regcomp and thereby simplifies the callers of file_regcomp() as they no longer need to handle errors. Also this reduces memory overhead slightly as we can make file_regex_t directly a regex_t, saving ~ 16 bytes per regex. | ||||
* | From Dirk Mueller: | Christos Zoulas | 2022-04-18 | 1 | -2/+2 |
| | | | | | when name/use was used, the regex caching table was incorrectly initialized, which led to false or missing matches. | ||||
* | From Dirk Mueller: | Christos Zoulas | 2022-04-18 | 1 | -11/+11 |
| | | | | | There is no need to group if there is no '|' used. magic is never evaluating captive groups. | ||||
* | From Dirk Mueller: | Christos Zoulas | 2022-04-18 | 1 | -5/+6 |
| | | | | | | | | | | | | | do a final fflush of stdout even in buffered mode so that a ENOSPACE is caught and propagated as an exit code 1 so that the surrounding logic can detect and handle it as a failure rather than silently misbehaving. reproducer is file somefile > /dev/full && echo exit code was 0 Also check printf even if type is null for consistency. | ||||
* | From Dirk Mueller: | Christos Zoulas | 2022-04-18 | 1 | -14/+14 |
| | | | | | | | | | | | * regex rules need literal dots escaped, otherwise they are considered any character * literal search strings can be searched using search rather than the much more expensive regex * use standard xml declaration search as used in other format matchers * only match the first 1024 bytes, the information we look for should be in the very first tag * remove unnecessary parentheses | ||||
* | Casts to compile cleanly with g++ | Christos Zoulas | 2022-04-11 | 4 | -10/+10 |
| | |||||
* | fix unused warnings | Christos Zoulas | 2022-04-11 | 2 | -5/+9 |
| | |||||
* | initialize hi; | Christos Zoulas | 2022-04-11 | 1 | -1/+2 |
| | |||||
* | use unsigned for holding the hi part of the surrogate pair | Christos Zoulas | 2022-04-11 | 1 | -2/+3 |
| | | | | (found by clusterfuzz) | ||||
* | PR/332: vinc: Fix misdetection of text file that start with valid json, | Christos Zoulas | 2022-04-04 | 6 | -2/+10 |
| | | | | but have trailing junk. | ||||
* | PR/334: jmp3r: Filter out bad ucs16 by handling surrogate pairs and invalid | Christos Zoulas | 2022-04-04 | 1 | -10/+31 |
| | | | | characters. | ||||
* | PR/336: stefanwascoding: fix broken zsh env magic | Christos Zoulas | 2022-04-04 | 1 | -2/+2 |
| | |||||
* | intel bios rom parsing and pci vendor id map from Joerg Jenderek | Christos Zoulas | 2022-04-02 | 3 | -10/+302 |
| | |||||
* | Recognize raspberry pi eeprom files (Joerg Jenderek) | Christos Zoulas | 2022-04-02 | 1 | -1/+24 |
| | |||||
* | Fix SAPCAR magic and add mime type (Markus Strehle) | Christos Zoulas | 2022-03-26 | 1 | -2/+6 |
| | |||||
* | Escape regex `.' twice since one level is removed by magic parsing. | Christos Zoulas | 2022-03-24 | 8 | -21/+21 |
| | | | | (Dirk Mueller) | ||||
* | Add detection for unescaped . outside of [] (Dirk Mueller) | Christos Zoulas | 2022-03-24 | 1 | -114/+129 |
| | |||||
* | Fix unused warnings | Christos Zoulas | 2022-03-24 | 1 | -4/+6 |
| | |||||
* | typo in previous | Christos Zoulas | 2022-03-21 | 1 | -2/+2 |
| | |||||
* | PR/326: aichingm: Add support for QGIS files | Christos Zoulas | 2022-03-21 | 1 | -4/+7 |
| | |||||
* | PR/32: wolfgangwalther: Add mime type for woff{,2} fonts | Christos Zoulas | 2022-03-21 | 1 | -1/+3 |
| | |||||
* | PR/328: adepasquale: Add more mimetypes and extensions | Christos Zoulas | 2022-03-21 | 4 | -4/+12 |
| | |||||
* | PR/327: vinc17 | Christos Zoulas | 2022-03-21 | 1 | -18/+27 |
| | | | | | | - bump the number of levels - add more debugging - make compile in test mode | ||||
* | PR/329: polluks: Another iff format | Christos Zoulas | 2022-03-21 | 1 | -1/+2 |
| | |||||
* | PR/323: tests fail. | Christos Zoulas | 2022-03-21 | 1 | -1/+1 |
| | |||||
* | 5view sniffer improvements from joerg jenderek | Christos Zoulas | 2022-03-20 | 1 | -2/+49 |
| | |||||
* | Now that we are cacheing regex's we cannot assume that we always | Christos Zoulas | 2022-03-19 | 4 | -40/+59 |
| | | | | | | do regcomp->regexec->regfree, so this causes memory corruption (and increased memory use with all the locale copies) in xlocale systems. Instead save and restore locales in regcomp and regexec as needed. | ||||
* | regex caching and filesystem full fixes (Dirk Mueller) | Christos Zoulas | 2022-03-19 | 4 | -89/+136 |
| | |||||
* | Handle full disk space errors as failure (Dirk Mueller) | Christos Zoulas | 2022-03-19 | 1 | -19/+22 |
| | | | | While here, re-organize the code a bit. | ||||
* | PR/332: vmurashev: create magic cookie with MAGIC_ERROR so that missing | Christos Zoulas | 2022-03-16 | 1 | -1/+1 |
| | | | | | files and symlinks that point to nowhere are detected. It is a more useful behavior. | ||||
* | Avoid double free (lightmouse) | Christos Zoulas | 2022-03-14 | 1 | -1/+0 |
| | |||||
* | Improve ARJ information (Joerg Jenderek) | Christos Zoulas | 2022-03-13 | 1 | -15/+125 |
| | |||||
* | Recognize (some) openoffice extension files (Joerg Jenderek) | Christos Zoulas | 2022-03-12 | 1 | -1/+13 |
| | |||||
* | Combine regex's to improve performance adjusting strength to preserve | Christos Zoulas | 2022-03-12 | 1 | -22/+7 |
| | | | | ranking (Dirk Mueller) | ||||
* | Recognize Autodesk 3ds Max (Joerg Jenderek) | Christos Zoulas | 2022-02-26 | 1 | -1/+15 |
| | |||||
* | Add another pattern to FoxPro FPT so that more files are recognized | Christos Zoulas | 2022-02-26 | 1 | -3/+5 |
| | | | | (Joerg Jenderek) | ||||
* | FIG image improvements from Joerg Jenderek | Christos Zoulas | 2022-02-19 | 1 | -2/+43 |
| | |||||
* | PR/319: jmp3r: UTF-16 does not require a BOM | Christos Zoulas | 2022-02-19 | 1 | -2/+2 |
| | |||||
* | PR/316: karagian: Bump strength to beat amd 29k a.out | Christos Zoulas | 2022-02-19 | 1 | -1/+2 |
| | |||||
* | Trim the whitespace for consistency. | Christos Zoulas | 2022-02-15 | 1 | -2/+2 |
| | |||||
* | Add oric tape format from polluks | Christos Zoulas | 2022-02-15 | 2 | -1/+14 |
| | |||||
* | new ccf magic from Georg Sauthoff | Christos Zoulas | 2022-02-15 | 2 | -1/+16 |
| | |||||
* | PR/315: polluks: Improve console output. | Christos Zoulas | 2022-02-14 | 1 | -6/+9 |
| | |||||
* | PR/311: ylep: Add magic for NIfTI: https://nifti.nimh.nih.gov/. | Christos Zoulas | 2022-02-14 | 2 | -1/+204 |
| | |||||
* | new arj test | Christos Zoulas | 2022-02-14 | 3 | -0/+3 |
| | |||||
* | PR/308: adepasquale: Arj magic improvements | Christos Zoulas | 2022-02-14 | 1 | -17/+20 |
| | |||||
* | PR/310: p870613: Don't use strlcpy to copy the string, it will try to scan | Christos Zoulas | 2022-02-14 | 1 | -4/+7 |
| | | | | | the source string to find out how much space is needed the source string might not be NUL terminated. | ||||
* | Improve NetCDF, joerg jenderek | Christos Zoulas | 2022-02-08 | 1 | -4/+27 |
| | |||||
* | fix mime and extension for mcrypt (Joerg Jenderek) | Christos Zoulas | 2022-02-08 | 1 | -1/+15 |
| | |||||
* | Improvements in FreeBSD minidumps from Michal Gorny | Christos Zoulas | 2022-01-19 | 1 | -8/+15 |
| |