Commit Graph

112 Commits

Author SHA1 Message Date
pgoyette
d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
christos
bbdfe8ae4a bring detail from HEAD 2019-01-01 03:12:30 +00:00
msaitoh
6b97a0ad63 Use DPSRCS for magic.h. OK'd by Christos. 2018-12-12 06:36:13 +00:00
christos
1ca2f79a24 fix lint fixes 2018-10-19 00:32:47 +00:00
christos
bdab9e2ddc lint fixes 2018-10-19 00:24:57 +00:00
christos
c02f7f97b6 Merge conflicts 2018-10-19 00:11:48 +00:00
christos
006f800885 2018-10-18 19:32 Christos Zoulas <christos@zoulas.com>
* release 5.35

2018-09-10  20:38  Christos Zoulas <christos@zoulas.com>

	* Add FreeBSD ELF core file support (John Baldwin)

2018-08-20  18:40  Christos Zoulas <christos@zoulas.com>

	* PR/30: Allow all parameter values to be set (don't treat 0 specially)
	* handle default annotations on the softmagic match instead at the
	  end.

2018-07-25  10:17  Christos Zoulas <christos@zoulas.com>

	* PR/23: Recognize JSON files

2018-07-25  10:17  Christos Zoulas <christos@zoulas.com>

	* PR/18: file --mime-encoding should not print mime-type

2018-07-25   8:50  Christos Zoulas <christos@zoulas.com>

	* release 5.34

2018-06-22  16:38  Christos Zoulas <christos@zoulas.com>

	* Add Quad indirect offsets

2018-05-24  14:10  Christos Zoulas <christos@zoulas.com>

	* Enable parsing of ELF dynamic sections to handle PIE better
2018-10-18 23:54:09 +00:00
christos
f6f2143a7d __noreturn__ does in the header. 2018-04-18 01:18:16 +00:00
christos
0d11799cf0 add __noreturn__ attribute to file_err{,x} 2018-04-18 01:17:42 +00:00
jakllsch
cbdb990355 sprinkle #ifdef __dead \n __dead \n #endif for clang 2018-04-17 12:34:04 +00:00
christos
5efe63de58 merge conflicts for file-5.33 2018-04-15 19:45:31 +00:00
christos
52d7030a87 2018-04-15 14:52 Christos Zoulas <christos@zoulas.com>
* release 5.33

2018-02-24  14:50  Christos Zoulas <christos@zoulas.com>

	* extend the support for ${x?:} expansions for magic descriptions

2018-02-21  16:25  Christos Zoulas <christos@zoulas.com>

	* add support for ${x?:} in mime types to handle
	  pie binaries.

2017-11-03   9:23  Christos Zoulas <christos@zoulas.com>

	* add support for negative offsets (offsets from the end of file)

2017-09-26   8:22  Christos Zoulas <christos@zoulas.com>

	* close the file on error when writing magic (Steve Grubb)

2017-09-24  12:02  Christos Zoulas <christos@zoulas.com>

	* seccomp support (Paul Moore)

2017-09-02  11:53  Christos Zoulas <christos@zoulas.com>

	* release 5.32

2017-08-28  16:37  Christos Zoulas <christos@zoulas.com>

	* Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos@zoulas.com>

	* Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos@zoulas.com>

	* pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos@zoulas.com>

	* PR/615 add magic_getflags()
2018-04-15 19:32:47 +00:00
christos
25f5939496 If we don't have any formatting characters, we are always ok. 2017-12-11 23:19:38 +00:00
abhinav
af4088eb76 Add magic_open to the NAME section 2017-10-22 11:17:39 +00:00
mlelstv
e30da9649b fix offset of segment count in NetBSD crashdump header. 2017-09-27 21:04:05 +00:00
christos
051bdd9a5a merge file-5.32 2017-09-08 13:40:24 +00:00
christos
41da50d881 2017-09-02 11:53 Christos Zoulas <christos@zoulas.com>
* release 5.32

2017-08-28  16:37  Christos Zoulas <christos@zoulas.com>

	* Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos@zoulas.com>

	* Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos@zoulas.com>

	* pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos@zoulas.com>

	* PR/615 add magic_getflags()

2017-05-23  13:55  Christos Zoulas <christos@zoulas.com>

	* release 5.31

2017-03-17  20:32  Christos Zoulas <christos@zoulas.com>

	* remove trailing spaces from magic files
	* refactor is_tar
	* better bounds checks for cdf
2017-09-08 13:22:41 +00:00
christos
e27253125a merge 5.31 2017-05-25 00:11:26 +00:00
christos
008b33e8a4 Import file-5.31; mostly oss-fuzz found bugs. 2017-05-24 23:59:56 +00:00
maya
c3094abd94 GC more gcc 4.8 specific (dead) logic 2017-02-22 12:34:49 +00:00
christos
0e0fd155f8 Ignore files that start with . 2017-02-17 17:33:00 +00:00
christos
79490ce26d fix reversed logic 2017-02-11 18:17:29 +00:00
christos
7fbfbdb218 fix der.c bump shared library 2017-02-10 18:11:17 +00:00
christos
44ddf42a53 pacify lint. 2017-02-10 18:06:59 +00:00
christos
7b11012806 put back maintainer mode 2017-02-10 17:56:27 +00:00
christos
74db5203d3 merge conflicts 2017-02-10 17:53:24 +00:00
christos
ae9cfef6ef 2017-02-10 12:24 Christos Zoulas <christos@zoulas.com>
* release 5.30

2017-02-07  23:27  Christos Zoulas <christos@zoulas.com>

	* If we exceeded the offset in a search return no match
	  (Christoph Biedl)
	* Be more lenient on corrupt CDF files (Christoph Biedl)

2017-02-04  16:46  Christos Zoulas <christos@zoulas.com>

	* pacify ubsan sign extension (oss-fuzz/524)

2017-02-01  12:42  Christos Zoulas <christos@zoulas.com>

	* off by one in cdf parsing (PR/593)
	* report debugging sections in elf (PR/591)

2016-11-06  10:52  Christos Zoulas <christos@zoulas.com>

	* Allow @@@ in extensions
	* Add missing overflow check in der magic (Jonas Wagner)

2016-10-25  10:40  Christos Zoulas <christos@zoulas.com>

	* release 5.29

2016-10-24  11:20  Christos Zoulas <christos@zoulas.com>

	* der getlength overflow (Jonas Wagner)
	* multiple magic file load failure (Christoph Biedl)

2016-10-17  11:26  Christos Zoulas <christos@zoulas.com>

	* CDF parsing improvements (Guy Helmer)

2016-07-20   7:26  Christos Zoulas <christos@zoulas.com>

	* Add support for signed indirect offsets

2016-07-18   7:41  Christos Zoulas <christos@zoulas.com>

	* cat /dev/null | file - should print empty (Christoph Biedl)

2016-07-05  15:20  Christos Zoulas <christos@zoulas.com>

	* Bump string size from 64 to 96.

2016-06-13  20:20  Christos Zoulas <christos@zoulas.com>

	* PR/556: Fix separators on annotations.

2016-06-13  19:40  Christos Zoulas <christos@zoulas.com>

	* release 5.28
	* fix leak on allocation failure

2016-06-01   1:20  Christos Zoulas <christos@zoulas.com>

	* PR/555: Avoid overflow for offset > nbytes
	* PR/550: Segv on DER parsing:
	    - use the correct variable for length
	    - set offset to 0 on failure.

2016-05-13  12:00  Christos Zoulas <christos@zoulas.com>

	* release 5.27

2016-04-18   9:35  Christos Zoulas <christos@zoulas.com>

	* Errors comparing DER entries or computing offsets
	  are just indications of malformed non-DER files.
	  Don't print them.
	* Offset comparison was off-by-one.
	* Fix compression code (Werner Fink)
	* Put new bytes constant in the right file (not the generated one)

2016-04-16  18:34  Christos Zoulas <christos@zoulas.com>

	* release 5.26

2016-03-31  13:50  Christos Zoulas <christos@zoulas.com>

	* make the number of bytes read from files configurable.

2016-03-21  13:40  Christos Zoulas <christos@zoulas.com>

	* Add bounds checks for DER code (discovered by Thomas Jarosch)
	* Change indirect recursion limit to indirect use count and
	  bump from 15 to 50 to prevent abuse.

2016-03-13  20:39  Christos Zoulas <christos@zoulas.com>

	* Add -00 which prints filename\0description\0

2016-03-01  13:28  Christos Zoulas <christos@zoulas.com>

	* Fix ID3 indirect parsing

2016-01-19  10:18  Christos Zoulas <christos@zoulas.com>

	* add DER parsing capability

2015-11-13  10:35  Christos Zoulas <christos@zoulas.com>

	* provide dprintf(3) for the OS's that don't have it.

2015-11-11  16:25  Christos Zoulas <christos@zoulas.com>

	* redo the compression code report decompression errors

2015-11-10  23:25  Christos Zoulas <christos@zoulas.com>

	* REG_STARTEND code is not working as expected, delete it.

2015-11-09  16:05  Christos Zoulas <christos@zoulas.com>

	* Add zlib support if we have it.

2015-11-05  11:22  Christos Zoulas <christos@zoulas.com>

	* PR/492: compression forking was broken with magic_buffer.

2015-09-16   9:50  Christos Zoulas <christos@zoulas.com>

	* release 5.25

2015-09-11  13:25  Christos Zoulas <christos@zoulas.com>

	* add a limit to the length of regex searches

2015-09-08   9:50  Christos Zoulas <christos@zoulas.com>

	* fix problems with --parameter (Christoph Biedl)

2015-07-11  10:35  Christos Zoulas <christos@zoulas.com>

	* Windows fixes PR/466 (Jason Hood)

2015-07-09  10:35  Christos Zoulas <christos@zoulas.com>

	* release 5.24

2015-06-11   8:52  Christos Zoulas <christos@zoulas.com>

	* redo long option encoding to fix off-by-one in 5.23

2015-06-10  13:50  Christos Zoulas <christos@zoulas.com>

	* release 5.23

2015-06-09  16:10  Christos Zoulas <christos@zoulas.com>

	* Fix issue with regex range for magic with offset
	* Always return true from mget with USE (success to mget not match
	  indication). Fixes mime evaluation after USE magic
	* PR/459: Don't insert magic entries to the list if there are parsing
	  errors for them.

2015-06-03  16:00  Christos Zoulas <christos@zoulas.com>

	* PR/455: Add utf-7 encoding

2015-06-03  14:30  Christos Zoulas <christos@zoulas.com>

	* PR/455: Implement -Z, look inside, but don't report on compression
	* PR/454: Fix allocation error on bad magic.

2015-05-29  10:30  Christos Zoulas <christos@zoulas.com>

	* handle MAGIC_CONTINUE everywhere, not just in softmagic

2015-05-21  14:30  Christos Zoulas <christos@zoulas.com>

	* don't print descriptions for NAME types when mime.

2015-04-09  15:59  Christos Zoulas <christos@zoulas.com>

	* Add --extension to list the known extensions for this file type
	  Idea by Andrew J Roazen

2015-02-14  12:23  Christos Zoulas <christos@zoulas.com>

	* Bump file search buffer size to 1M.

2015-01-09  14:35  Christos Zoulas <christos@zoulas.com>

	* Fix multiple issues with date formats reported by Christoph Biedl:
		- T_LOCAL meaning was reversed
		- Arithmetic did not work
	  Also stop adjusting daylight savings for gmt printing.

2015-01-05  13:00  Christos Zoulas <christos@zoulas.com>

	* PR/411: Fix memory corruption from corrupt cdf file.
2017-02-10 17:42:56 +00:00
sevan
cc576e1d8e Update supporting files for components which rely on autoconf to allow systems
introducing since release of software to be recognised. This should hopefully
allow the builds to progress a littles further on systems such as the POWER8
which features a little endian 64-bit PowerPC CPU identified as ppc64le.
2017-02-01 09:26:39 +00:00
christos
ce41637aeb Build magic.h before all objs. 2017-01-10 13:51:36 +00:00
abhinav
484007c8cd Correct a sentence in the HISTORY section.
Remove a mention of "1989" at the end of the 4th paragraph in HISTORY section,
probably leftover because of copy-paste from the paragraph above.
Sort SEE ALSO.
Remove trailing white spaces at some places.
Remove Pp after Sh at few places as pointed out by mandoc.

ok christos@
2017-01-03 11:34:41 +00:00
christos
46a8957adc add a clear that did not merge. 2015-01-02 23:38:45 +00:00
christos
d9d66a76ab fix recursion 2015-01-02 23:27:46 +00:00
christos
fa9ee4980d merge conflicts 2015-01-02 21:15:32 +00:00
christos
3c9d2f3579 Import file-5.22 2015-01-02 20:34:26 +00:00
christos
c549f6694c fix bogus kernel core magic entries from file HEAD. 2014-12-08 20:54:33 +00:00
christos
d15a70e497 regen 2014-10-20 22:04:30 +00:00
christos
679907738e sync with head of upstream to fix MacOS/X compilation and more. 2014-10-20 21:48:57 +00:00
christos
2a88bcf165 regen 2014-10-10 20:57:48 +00:00
christos
58b7f19951 welcome to file-5.20 2014-10-10 20:15:01 +00:00
christos
ebfd11214d import file-5.20; bug fixes and better image magic descriptions. 2014-10-10 20:08:15 +00:00
matt
3b6f53715b Add UCB RISC-V EM value 2014-09-19 08:59:38 +00:00
christos
fdbbaf2d5a PR/49192: remove dup assignment. 2014-09-11 13:30:04 +00:00
joerg
a1fef3e08e Initialise all fields. 2014-06-13 13:38:52 +00:00
christos
819e6405b7 merge conflicts 2014-06-13 02:08:06 +00:00
christos
012fd1339d import file-5.19
2014-06-09   9:04  Christos Zoulas <christos@zoulas.com>

	* Misc buffer overruns and missing buffer size tests in cdf parsing
	  (Francisco Alonso, Jan Kaluza)

2014-06-02  14:50  Christos Zoulas <christos@zoulas.com>

	* Enforce limit of 8K on regex searches that have no limits
	* Allow the l modifier for regex to mean line count. Default
	  to byte count. If line count is specified, assume a max
	  of 80 characters per line to limit the byte count.
	* Don't allow conversions to be used for dates, allowing
	  the mask field to be used as an offset.

2014-05-30  12:51  Christos Zoulas <christos@zoulas.com>

	* Make the range operator limit the length of the
	  regex search.

2014-05-14  19:23  Christos Zoulas <christos@zoulas.com>

	* PR/347: Windows fixes
	* PR/352: Hangul word processor recognition
	* PR/354: Encoding irregularities in text files

2014-05-06  6:12  Christos Zoulas <christos@zoulas.com>

	* Fix uninitialized title in CDF files (Jan Kaluza)

2014-05-04  14:55  Christos Zoulas <christos@zoulas.com>

	* PR/351: Fix compilation of empty files

2014-04-30  17:39  Christos Zoulas <christos@zoulas.com>

	* Fix integer formats: We don't specify 'l' or
	  'h' and 'hh' specifiers anymore, only 'll' for
	  quads and nothing for the rest. This is so that
	  magic writing is simpler.

2014-04-01  15:25  Christos Zoulas <christos@zoulas.com>

	* PR/341: Jan Kaluza, fix memory leak
	* PR/342: Jan Kaluza, fix out of bounds read

2014-03-28  15:25  Christos Zoulas <christos@zoulas.com>

	* Fix issue with long formats not matching fmtcheck
2014-06-13 01:48:18 +00:00
martin
109f288e06 Make a gcc 4.8 warning non-fatal (couldn't find a way to avoid it, the
data is initialized via memcpy to a void pointer, so the "may be uninitialized"
warning is not true)
2014-01-17 20:24:20 +00:00
joerg
960bda48eb Only use __dead if it exists. 2014-01-16 23:36:52 +00:00
joerg
0ce9920b0c Mark some more dead functions. 2014-01-16 23:35:54 +00:00
christos
2b043c75b6 eliminate use of bsd.sys.mk from Makefiles 2014-01-16 01:15:32 +00:00
joerg
bbb837ac5b Format string checks for file_vprintf and file_error_core 2014-01-07 02:12:07 +00:00