summaryrefslogtreecommitdiff
path: root/src/file.h
Commit message (Collapse)AuthorAgeFilesLines
* For CSV print more info about what kind of text file it is if we have it.Christos Zoulas2023-02-201-2/+3
| | | | (William Chen)
* bump notes section size to read to 128M (Vincent Michalkovic) and make itChristos Zoulas2023-02-091-1/+3
| | | | configurable. Delete unused constants.
* prefix public/private/protected with file_Christos Zoulas2022-12-261-78/+78
|
* Increase the number of bytes we are looking for (Joerg Jenderek)Christos Zoulas2022-10-021-3/+3
|
* Revert previousChristos Zoulas2022-09-241-3/+1
|
* mdd build glue, bump versionChristos Zoulas2022-09-241-1/+3
|
* Argument order consistency.Christos Zoulas2022-09-101-3/+3
|
* Add octal indirect magic (Michal Gorny)Christos Zoulas2022-09-101-4/+7
|
* PR/362: ro-ee: fix wide char printingChristos Zoulas2022-07-041-2/+2
|
* make file_printable public for nowChristos Zoulas2022-05-281-2/+2
|
* PR/351: CathyKMeow: octalify unprintable characters in filenames unless raw.Christos Zoulas2022-05-281-2/+2
|
* From: Dirk Mueller:Christos Zoulas2022-04-181-7/+2
| | | | | | | | | 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.
* fix unused warningsChristos Zoulas2022-04-111-1/+4
|
* Now that we are cacheing regex's we cannot assume that we alwaysChristos Zoulas2022-03-191-10/+8
| | | | | | 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 Zoulas2022-03-191-18/+20
|
* Add support for msdos dates and timesChristos Zoulas2021-10-241-57/+65
|
* PR/270: Don't translate unprintable characters in %s magic formats when -rChristos Zoulas2021-06-301-3/+10
|
* Add a new flag that requires that the match is a full word, not a partial wordChristos Zoulas2021-05-091-1/+3
| | | | match.
* PR/230: polluks: Fix trim flag to apply to regex, and trim windows init \rChristos Zoulas2021-02-051-1/+2
|
* PR/234: halaei: Add limit to the number of bytes to scan for encodingChristos Zoulas2021-02-051-1/+3
| | | | | | | file_buffer(3) passed the full size of the buffer to the encoding determination function. If the file was too large, we ended up allocating (2 * size + 4 * size) buffers to scan for encoding. Now we limit size to 64K.
* Fix close_on_exec multithreaded decompression issue.Christos Zoulas2020-12-081-1/+11
|
* PR/189: neal: Save and restore the contiuation levels around match in "use".Christos Zoulas2020-09-051-5/+7
|
* - rename unichar -> file_unichar_t to fix build on Haiku (devnexen)Christos Zoulas2020-08-141-5/+5
| | | | - cleanup ascmagic conversion to reduce duplicated code.
* back to using unsigned offsets since ClusterFuzz bitches about integer overflow.Christos Zoulas2020-06-081-3/+3
|
* Fix indirect offsets.Christos Zoulas2020-06-071-3/+3
|
* fix typos.Christos Zoulas2020-06-021-3/+3
|
* Try to fix MINGW64 compilationChristos Zoulas2020-05-311-17/+30
|
* - introduce offset type which is matched against the actual offset of theChristos Zoulas2020-05-091-3/+5
| | | | | magic entry. - indicate negative offset using a flag so that -0 works.
* remove unused constantChristos Zoulas2020-03-201-3/+1
|
* - change default for name/use to 50Christos Zoulas2020-03-191-8/+8
| | | | | - update code to print the current parameters so that they don't end up out of date.
* Make file_fmttime() take the size of the buffer, so we can use strlcpy().Christos Zoulas2020-03-081-2/+2
| | | | (SonarQube)
* We don't allow * in printf formats anywhere - not in magic descriptions andChristos Zoulas2020-02-201-1/+2
| | | | not in the code itself (Christoph Biedl)
* PR/140: Avoid aborting on corrupt magic files.Christos Zoulas2020-02-161-3/+6
|
* PR/139: avoid excessive printing from doctored magic files (gockelhahn)Christos Zoulas2020-02-131-1/+4
| | | | | - keep track of how much we've printed so far, and stop at 1M - parse the printf(3) format and abort on large field widths.
* Add GUID support.Christos Zoulas2019-12-241-5/+11
|
* Limit the CSV test to text files and say so...Christos Zoulas2019-06-261-2/+2
|
* PR/85: Add a simple CSV detectorChristos Zoulas2019-06-081-1/+2
|
* From: Denys VlasenkoChristos Zoulas2019-05-071-4/+5
| | | | | Reduce amount of stat(2) calls when processing elf files; propagate fstat result deeper into callees.
* - Add a file_separator function that prints the separator.Christos Zoulas2019-05-061-1/+2
| | | | - Don't append a separator after ascmagic since this is the last test.
* remove strtoul check (petk)Christos Zoulas2019-03-281-5/+1
|
* remove strerror check (petk)Christos Zoulas2019-03-281-8/+1
|
* PR/62: spinpx: limit size of file_printable.Christos Zoulas2019-02-181-2/+2
|
* more lint fixesChristos Zoulas2018-10-191-2/+2
|
* lint fixesChristos Zoulas2018-10-191-2/+2
|
* - use SIZE_T_FORMAT instead of 'z' in size_t format stringsChristos Zoulas2018-10-151-1/+4
| | | | - compile with c++ again
* remove tests for stddef.h, locale.h, limits.h all defined in c89 (petk)Christos Zoulas2018-10-011-3/+1
|
* Remove trailing whitespaceChristos Zoulas2018-09-091-4/+4
| | | | | XXX: We can't do this yet from magic files because trailing whitespace is significant.
* It used to be the case that if a magic entry was found (with non-nulChristos Zoulas2018-08-201-1/+2
| | | | | | | | description) that had no auxiliary information (apple, mime, or extension) and one of them was requested, we kept looking for other entries and if a worse match was found that had auxiliary information, that was printed. This is unexpected, so print the default auxiliary information instead if a magic match is found.
* Add a simple JSON parser...Christos Zoulas2018-08-111-1/+2
|
* Eliminate toctou by using fstat and always opening with non-blocking i/o.Christos Zoulas2018-08-011-1/+4
| | | | Found by coverity.