]> granicus.if.org Git - file/log
file
10 years agoFix incorrect bounds check for sector count. (Francisco Alonso and Jan Kaluza
Christos Zoulas [Wed, 4 Jun 2014 17:23:19 +0000 (17:23 +0000)]
Fix incorrect bounds check for sector count. (Francisco Alonso and Jan Kaluza
at RedHat)

10 years agoremove stray g.
Christos Zoulas [Tue, 3 Jun 2014 20:40:31 +0000 (20:40 +0000)]
remove stray g.

10 years agoPR/356: Spelling fixes
Christos Zoulas [Tue, 3 Jun 2014 19:17:27 +0000 (19:17 +0000)]
PR/356: Spelling fixes

10 years agoPR/355: use vnd.debian.binary-package mime type.
Christos Zoulas [Tue, 3 Jun 2014 19:15:58 +0000 (19:15 +0000)]
PR/355: use vnd.debian.binary-package mime type.

10 years agoPR/357: flake8 warning cleanups
Christos Zoulas [Tue, 3 Jun 2014 19:14:46 +0000 (19:14 +0000)]
PR/357: flake8 warning cleanups

10 years ago* Enforce limit of 8K on regex searches that have no limits
Christos Zoulas [Tue, 3 Jun 2014 19:01:34 +0000 (19:01 +0000)]
* 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.
* Bump the version of the magic format so that regex changes
  are visible.

10 years agoAdd map
Christos Zoulas [Tue, 3 Jun 2014 18:22:34 +0000 (18:22 +0000)]
Add map

10 years agoPR/358: Add .FIT map data.
Christos Zoulas [Tue, 3 Jun 2014 18:22:25 +0000 (18:22 +0000)]
PR/358: Add .FIT map data.

10 years agoremove line number mention in regex. We don't want to scan binary files
Christos Zoulas [Tue, 3 Jun 2014 17:36:13 +0000 (17:36 +0000)]
remove line number mention in regex. We don't want to scan binary files
that don't have \n's forever, so make the limit be the number of bytes.

10 years agoAdd norton guide files (Joerg Jenderek)
Christos Zoulas [Tue, 3 Jun 2014 01:40:24 +0000 (01:40 +0000)]
Add norton guide files (Joerg Jenderek)

10 years agoremove l modifier
Christos Zoulas [Mon, 2 Jun 2014 19:27:54 +0000 (19:27 +0000)]
remove l modifier

10 years agoUse more the dos filename function (Joerg Jenderek)
Christos Zoulas [Mon, 2 Jun 2014 17:53:45 +0000 (17:53 +0000)]
Use more the dos filename function (Joerg Jenderek)

10 years agoPatch for acronis (Joerg Jenderek)
Christos Zoulas [Mon, 2 Jun 2014 17:49:48 +0000 (17:49 +0000)]
Patch for acronis (Joerg Jenderek)

10 years agoupdate from Joerg Jenderek
Christos Zoulas [Mon, 2 Jun 2014 17:48:56 +0000 (17:48 +0000)]
update from Joerg Jenderek

10 years agofix some more MBR misidentifications (Joerg Jenderek)
Christos Zoulas [Sun, 1 Jun 2014 22:47:52 +0000 (22:47 +0000)]
fix some more MBR misidentifications (Joerg Jenderek)

10 years agoSymantek GHOST magic (Joerg Jenderek)
Christos Zoulas [Sun, 1 Jun 2014 19:15:26 +0000 (19:15 +0000)]
Symantek GHOST magic (Joerg Jenderek)

10 years agoFix some Dyalog APL magic that does not make sense (Joerg Jenderek)
Christos Zoulas [Sun, 1 Jun 2014 19:14:42 +0000 (19:14 +0000)]
Fix some Dyalog APL magic that does not make sense (Joerg Jenderek)

10 years agoFix the strength of DOS/MBR (Joerg Jenderek)
Christos Zoulas [Sun, 1 Jun 2014 19:13:54 +0000 (19:13 +0000)]
Fix the strength of DOS/MBR (Joerg Jenderek)

10 years agodocument regex limit.
Christos Zoulas [Fri, 30 May 2014 16:52:20 +0000 (16:52 +0000)]
document regex limit.

10 years agoUpdate regex recommendation.
Christos Zoulas [Fri, 30 May 2014 16:51:23 +0000 (16:51 +0000)]
Update regex recommendation.

10 years agoLimit regex search for BEGIN to the first 4K of the file.
Christos Zoulas [Fri, 30 May 2014 16:48:44 +0000 (16:48 +0000)]
Limit regex search for BEGIN to the first 4K of the file.

10 years agoIf requested, limit search length.
Christos Zoulas [Fri, 30 May 2014 16:47:44 +0000 (16:47 +0000)]
If requested, limit search length.

10 years agorecognize nonorton ghost files. Joerg Jenderek
Christos Zoulas [Fri, 30 May 2014 15:07:02 +0000 (15:07 +0000)]
recognize nonorton ghost files. Joerg Jenderek

10 years ago- fix non-ascii.
Christos Zoulas [Wed, 28 May 2014 20:33:59 +0000 (20:33 +0000)]
- fix non-ascii.
- mention recent changes

10 years agofurther optimize awk by not looking for the BEGIN regex until we found the
Christos Zoulas [Wed, 28 May 2014 19:52:36 +0000 (19:52 +0000)]
further optimize awk by not looking for the BEGIN regex until we found the
BEGIN (Jan Kaluza)

10 years agofix endianness problem.
Christos Zoulas [Wed, 28 May 2014 19:50:41 +0000 (19:50 +0000)]
fix endianness problem.

10 years agoCVE-2014-0207: Prevent 0 element vectors and vectors longer than the number
Christos Zoulas [Wed, 21 May 2014 13:04:38 +0000 (13:04 +0000)]
CVE-2014-0207: Prevent 0 element vectors and vectors longer than the number
of properties from accessing random memory.

10 years agoadd linux device tree.
Christos Zoulas [Tue, 20 May 2014 20:10:17 +0000 (20:10 +0000)]
add linux device tree.

10 years agoPR/343: dosexec mime broken
Christos Zoulas [Thu, 15 May 2014 01:24:58 +0000 (01:24 +0000)]
PR/343: dosexec mime broken

10 years agoPR/354: Fix stray ^M's
Christos Zoulas [Wed, 14 May 2014 23:32:30 +0000 (23:32 +0000)]
PR/354: Fix stray ^M's

10 years agoPR/354: Encoding irregularities.
Christos Zoulas [Wed, 14 May 2014 23:30:28 +0000 (23:30 +0000)]
PR/354: Encoding irregularities.

10 years agoPR/352: Support for Hangul (Korean) Word Processor 5.x Files (*.hwp)
Christos Zoulas [Wed, 14 May 2014 23:22:48 +0000 (23:22 +0000)]
PR/352: Support for Hangul (Korean) Word Processor 5.x Files (*.hwp)

10 years agoPR/347: Windows patches.
Christos Zoulas [Wed, 14 May 2014 23:15:42 +0000 (23:15 +0000)]
PR/347: Windows patches.

10 years agoremove unused.
Christos Zoulas [Wed, 14 May 2014 23:09:21 +0000 (23:09 +0000)]
remove unused.

10 years agoPR/346: New sereal magic
Christos Zoulas [Wed, 14 May 2014 23:04:59 +0000 (23:04 +0000)]
PR/346: New sereal magic

10 years agoPR/353: Dagobert Michelsen: Add "file.h" to get proper headers for intptr_t
Christos Zoulas [Tue, 13 May 2014 16:48:12 +0000 (16:48 +0000)]
PR/353: Dagobert Michelsen: Add "file.h" to get proper headers for intptr_t

10 years agoRoman I Khimov:
Christos Zoulas [Tue, 13 May 2014 16:44:24 +0000 (16:44 +0000)]
Roman I Khimov:
access() can't handle NULL as first argument and we can end up
calling it this way if inname is NULL in file_or_fd() and fd is a
pipe. Issue spotted by clang static analysis.

10 years agoRoman I Khimov:
Christos Zoulas [Tue, 13 May 2014 16:42:17 +0000 (16:42 +0000)]
Roman I Khimov:
Remove useless assignments found by clang static analysis.

10 years agoRoman I Khimov:
Christos Zoulas [Tue, 13 May 2014 16:41:06 +0000 (16:41 +0000)]
Roman I Khimov:
If cdf_count_chain() is called with sid < 0, then we end up returning
zero length, which in turn leads to calloc() calls for 0 bytes in
cdf_read_long_sector_chain(), cdf_read_short_sector_chain() and
cdf_read_ssat(). Depending on calloc() implementation we can end
up returning -1 or 0 from those. As negative sid is probably wrong
case anyway, it might be better to always return -1.
Issue found by clang static analysis.

10 years agoRoman I Khimov:
Christos Zoulas [Tue, 13 May 2014 16:38:23 +0000 (16:38 +0000)]
Roman I Khimov:
If file_reset() fails for some reason, we pass uninitialized sb to
close_and_restore() which uses it for utimes().
Issue spotted by clang static analysis.

10 years agoFix coredump in clang caused by missing array terminator element.
Christos Zoulas [Wed, 7 May 2014 21:26:06 +0000 (21:26 +0000)]
Fix coredump in clang caused by missing array terminator element.

10 years agomerge dup VDI
Christos Zoulas [Wed, 7 May 2014 21:25:41 +0000 (21:25 +0000)]
merge dup VDI
move virtual images from msdos to virtual

10 years agomore lz4
Christos Zoulas [Wed, 7 May 2014 19:36:59 +0000 (19:36 +0000)]
more lz4

10 years agoFix for uninialized title (Jan Kaluza)
Christos Zoulas [Wed, 7 May 2014 10:13:12 +0000 (10:13 +0000)]
Fix for uninialized title (Jan Kaluza)

10 years agoRemove loop that kept reading the same offset (Jan Kaluza)
Christos Zoulas [Tue, 6 May 2014 18:20:39 +0000 (18:20 +0000)]
Remove loop that kept reading the same offset (Jan Kaluza)

10 years ago_POSIX2_RE_DUP_MAX is 255 on most systems.
Christos Zoulas [Tue, 6 May 2014 16:08:32 +0000 (16:08 +0000)]
_POSIX2_RE_DUP_MAX is 255 on most systems.

10 years agoCompile regex during the magic compilation process so that we catch bad
Christos Zoulas [Tue, 6 May 2014 16:07:23 +0000 (16:07 +0000)]
Compile regex during the magic compilation process so that we catch bad
regular expressions early.

10 years agofactor out all the duplicated regex code into a wrapper.
Christos Zoulas [Mon, 5 May 2014 20:53:10 +0000 (20:53 +0000)]
factor out all the duplicated regex code into a wrapper.

10 years agoApply patches from file-CVE-2012-1571.patch
Christos Zoulas [Mon, 5 May 2014 16:11:21 +0000 (16:11 +0000)]
Apply patches from file-CVE-2012-1571.patch
From Francisco Alonso Espejo:
    file < 5.18/git version can be made to crash when checking some
    corrupt CDF files (Using an invalid cdf_read_short_sector size)
    The problem I found here, is that in most situations (if
    h_short_sec_size_p2 > 8) because the blocksize is 512 and normal
    values are 06 which means reading 64 bytes.As long as the check
    for the block size copy is not checked properly (there's an assert
    that makes wrong/invalid assumptions)

10 years agoPR/351: Fix compilation of empty files.
Christos Zoulas [Sun, 4 May 2014 18:57:34 +0000 (18:57 +0000)]
PR/351: Fix compilation of empty files.

10 years agoCode to detect gnu attributes, and start of parser.
Christos Zoulas [Fri, 2 May 2014 02:25:10 +0000 (02:25 +0000)]
Code to detect gnu attributes, and start of parser.

10 years agoFrom Christoph Biedl:
Christos Zoulas [Fri, 2 May 2014 00:26:49 +0000 (00:26 +0000)]
From Christoph Biedl:
Debian bug #745546 et al: At the moment, the magic for "Macromedia
Flash data" and "Macromedia Flash Video" is just three printable
characters, no wonder this results in mis-detection of text files.

"Flash Video" is easy to fix, according to Wikipedia the forth
octet must have value 1.

"Flash data" is more work. The length information at offset 4 must be
non-zero, and the version number at offset 3 must be sound. According
to the pdf document, the latest version is 19, I found a few examples
in the lower twenties, so 32 should be a sane limit for the time
being. There are however quite a few files with version 255, and since
the virus scanners created an alert for all of them, they are now
reported as "suspicious".

10 years agoKill %h %hh and %l modifiers for bytes, shorts, and longs respectively.
Christos Zoulas [Wed, 30 Apr 2014 21:41:01 +0000 (21:41 +0000)]
Kill %h %hh and %l modifiers for bytes, shorts, and longs respectively.
Use nothing, for all types except quads which need %ll

10 years agoAdd missing specifiers for %h?
Christos Zoulas [Mon, 28 Apr 2014 14:09:07 +0000 (14:09 +0000)]
Add missing specifiers for %h?

10 years agofix integer format widths
Christos Zoulas [Mon, 28 Apr 2014 12:04:50 +0000 (12:04 +0000)]
fix integer format widths

10 years agoadd perl hash magic
Christos Zoulas [Mon, 28 Apr 2014 12:04:35 +0000 (12:04 +0000)]
add perl hash magic

10 years agoFix wrong ifdef configure test (Jean-Louis CHARTON)
Christos Zoulas [Thu, 17 Apr 2014 12:47:11 +0000 (12:47 +0000)]
Fix wrong ifdef configure test (Jean-Louis CHARTON)

10 years agotry to fix memcpy (Jean-Louis CHARTON)
Christos Zoulas [Thu, 17 Apr 2014 12:45:50 +0000 (12:45 +0000)]
try to fix memcpy (Jean-Louis CHARTON)

10 years agokill c99 comments, aix does not like them (Jean-Louis CHARTON)
Christos Zoulas [Thu, 17 Apr 2014 12:44:01 +0000 (12:44 +0000)]
kill c99 comments, aix does not like them (Jean-Louis CHARTON)

10 years agoPR/337: Fix incorrect handling of offsets (wrong sign)
Christos Zoulas [Sat, 12 Apr 2014 15:47:10 +0000 (15:47 +0000)]
PR/337: Fix incorrect handling of offsets (wrong sign)
Test:
$ perl -e 'print "ABC", "\xff\xff", "\x00"x70000, "DEF"' > abc.data
$ cat abc.magic
0 string ABC ABC test file format
>(3.s) search/0x3000 DEF \b, DEF sub type
$ file -m abc.magic abc.data
abc.data: ABC test file format, DEF sub type

10 years agoPR/339: updates from Rick Richardson
Christos Zoulas [Sat, 12 Apr 2014 14:51:52 +0000 (14:51 +0000)]
PR/339: updates from Rick Richardson

10 years agoPR/340: New magic for snappy framing
Christos Zoulas [Sat, 12 Apr 2014 14:44:33 +0000 (14:44 +0000)]
PR/340: New magic for snappy framing

10 years agoPR/345: add tests for intptr_t and uintptr_t
Christos Zoulas [Sat, 12 Apr 2014 14:41:34 +0000 (14:41 +0000)]
PR/345: add tests for intptr_t and uintptr_t

10 years agoFix regression: If a file was already bytes, don't try to convert it.
Christos Zoulas [Thu, 3 Apr 2014 20:47:24 +0000 (20:47 +0000)]
Fix regression: If a file was already bytes, don't try to convert it.
From: Arfrever Frehtes Taifersar Arahesis

10 years agoNew fixes
Christos Zoulas [Tue, 1 Apr 2014 15:57:45 +0000 (15:57 +0000)]
New fixes

10 years agoPR/341: Jan Kaluza: Fix memory leak
Christos Zoulas [Tue, 1 Apr 2014 15:57:28 +0000 (15:57 +0000)]
PR/341: Jan Kaluza: Fix memory leak

10 years agoPR/342: Jan Kaluza: Reverse order of evaluation to fix out of bounds read.
Christos Zoulas [Tue, 1 Apr 2014 15:44:26 +0000 (15:44 +0000)]
PR/342: Jan Kaluza: Reverse order of evaluation to fix out of bounds read.

10 years agoraise the strength of the targa magic, instead of dropping the cursor magic
Christos Zoulas [Sun, 30 Mar 2014 21:41:45 +0000 (21:41 +0000)]
raise the strength of the targa magic, instead of dropping the cursor magic
so that they does not get recognized as lotus 123 files. From Christoph Biedl

10 years agoremove extra line (Christoph Biedl)
Christos Zoulas [Sun, 30 Mar 2014 21:40:08 +0000 (21:40 +0000)]
remove extra line (Christoph Biedl)

10 years agocapitalize sparc
Christos Zoulas [Sat, 29 Mar 2014 15:40:34 +0000 (15:40 +0000)]
capitalize sparc

10 years agoImprove library detection, (Christoph Biedl)
Christos Zoulas [Fri, 28 Mar 2014 19:11:40 +0000 (19:11 +0000)]
Improve library detection, (Christoph Biedl)

10 years agofix compilation without fmt debug.
Christos Zoulas [Fri, 28 Mar 2014 19:07:08 +0000 (19:07 +0000)]
fix compilation without fmt debug.

10 years agoreduce strength of windows cursors so that they don't win over Targa files
Christos Zoulas [Fri, 28 Mar 2014 19:06:09 +0000 (19:06 +0000)]
reduce strength of windows cursors so that they don't win over Targa files
(Christoph Biedl)

10 years ago- Add some debugging code to print incorrect formats.
Christos Zoulas [Thu, 27 Mar 2014 18:12:12 +0000 (18:12 +0000)]
- Add some debugging code to print incorrect formats.
- Fix "long" formats which in magic "long" == 32 bit, which is not
  what "long" means in "C".

10 years agowelcome to 5.18 FILE5_18
Christos Zoulas [Wed, 26 Mar 2014 15:28:41 +0000 (15:28 +0000)]
welcome to 5.18

10 years agoadd megaraid.
Christos Zoulas [Sun, 23 Mar 2014 18:05:38 +0000 (18:05 +0000)]
add megaraid.

10 years agominor changes
Christos Zoulas [Sun, 16 Mar 2014 13:32:55 +0000 (13:32 +0000)]
minor changes

10 years agoTurn heading into markdown heading.
Kimmo Suominen [Sun, 16 Mar 2014 08:56:36 +0000 (08:56 +0000)]
Turn heading into markdown heading.

Verify that PR/336 is addressed also.

10 years agoDocument the release procedure.
Kimmo Suominen [Sun, 16 Mar 2014 08:53:09 +0000 (08:53 +0000)]
Document the release procedure.

10 years agoadd ConTeXt documents
Christos Zoulas [Sun, 16 Mar 2014 02:53:03 +0000 (02:53 +0000)]
add ConTeXt documents

10 years agoadd fmtcheck
Christos Zoulas [Sat, 15 Mar 2014 21:47:40 +0000 (21:47 +0000)]
add fmtcheck

10 years agotoday's changes
Christos Zoulas [Fri, 14 Mar 2014 19:14:11 +0000 (19:14 +0000)]
today's changes

10 years agoPR/319: Remove superfluous call to file_ascmagic_with_encoding. file_encoding
Christos Zoulas [Fri, 14 Mar 2014 19:02:37 +0000 (19:02 +0000)]
PR/319: Remove superfluous call to file_ascmagic_with_encoding. file_encoding
should have set looks_text correctly before, and file_ascmagic already calls
file_ascmagic_with_encoding if it needs to.

10 years agoPR/320: Issue a warning for mime types that are attached to magic entries
Christos Zoulas [Fri, 14 Mar 2014 18:48:11 +0000 (18:48 +0000)]
PR/320: Issue a warning for mime types that are attached to magic entries
that don't yet have descriptions.

10 years agoFix mime entries that were attached to magic entries that did not yet
Christos Zoulas [Fri, 14 Mar 2014 18:47:29 +0000 (18:47 +0000)]
Fix mime entries that were attached to magic entries that did not yet
have descriptions.

10 years agoPR/333: Be more precise about counting the strength of a regex, by counting the
Christos Zoulas [Fri, 14 Mar 2014 17:38:33 +0000 (17:38 +0000)]
PR/333: Be more precise about counting the strength of a regex, by counting the
number of actual matching characters specified in them.

10 years agoPR/334: don't try to free the magic list if it was not allocated, since this
Christos Zoulas [Fri, 14 Mar 2014 14:58:59 +0000 (14:58 +0000)]
PR/334: don't try to free the magic list if it was not allocated, since this
is an error.

10 years agoremove debugging printf.
Christos Zoulas [Tue, 11 Mar 2014 21:00:13 +0000 (21:00 +0000)]
remove debugging printf.

10 years agoremove bogus comment
Christos Zoulas [Tue, 11 Mar 2014 17:13:18 +0000 (17:13 +0000)]
remove bogus comment

10 years agofix bug intruduced by the locale changes.
Christos Zoulas [Tue, 11 Mar 2014 15:52:54 +0000 (15:52 +0000)]
fix bug intruduced by the locale changes.

10 years agoAdd ID.
Kimmo Suominen [Mon, 10 Mar 2014 12:42:49 +0000 (12:42 +0000)]
Add ID.

10 years agoSort list of packages for ease of maintenance.
Kimmo Suominen [Mon, 10 Mar 2014 12:38:08 +0000 (12:38 +0000)]
Sort list of packages for ease of maintenance.

10 years agoRemove explicit autotools-dev.
Kimmo Suominen [Mon, 10 Mar 2014 12:35:59 +0000 (12:35 +0000)]
Remove explicit autotools-dev.

10 years agoFix typo another way. Per Christoph Biedl.
Kimmo Suominen [Mon, 10 Mar 2014 08:48:18 +0000 (08:48 +0000)]
Fix typo another way. Per Christoph Biedl.

10 years agoescape space.
Christos Zoulas [Mon, 10 Mar 2014 00:53:38 +0000 (00:53 +0000)]
escape space.

10 years agoFix typo.
Kimmo Suominen [Sun, 9 Mar 2014 11:18:24 +0000 (11:18 +0000)]
Fix typo.

10 years agoAdd compiled delphi magic
Christos Zoulas [Sat, 8 Mar 2014 21:43:09 +0000 (21:43 +0000)]
Add compiled delphi magic

10 years agoExplain date number format (Christoph Biedl)
Christos Zoulas [Sat, 8 Mar 2014 17:28:08 +0000 (17:28 +0000)]
Explain date number format (Christoph Biedl)

10 years agoFIx windows icons and cursors (Christoph Biedl)
Christos Zoulas [Sat, 8 Mar 2014 17:26:48 +0000 (17:26 +0000)]
FIx windows icons and cursors (Christoph Biedl)

the detection of MS-Windows icon files was buggy and incomplete. Since
non-animated cursors have a very similar format, they are added here,
too.

Some details: Using only the very first four octets for determination
has always some risk of false detection. So additionally look at
offset 9 which should always be zero, but according to Wikipedia might
also be 0xff.

In "number of colors" at offset 8, the zero value previously was used
to describe "256 colors", according to Wikipedia this isn't true, so
it was dropped.

On a side node: This introduces another usage of name/use. I'm afraid
we might sooner or later end up in name clashes on these identifiers.
Feel free to extend them like prefixing with the file name "msdos-".

Also, I was a bit surprised no "message" in "use" is printed, I wanted
to do

    >>4 use     ico-dir     MS Windows icon resource

but that message gets lost. Hence the hackery

    >>0 byte    x           MS Windows icon resource
    >>4 use     ico-dir

So a feature request: Print any message in "use".

This patch by the way fixes Debian#562250. It just got a little
bigger.

10 years agoSync README.DEVELOPER and .travis.yml
Kimmo Suominen [Sat, 8 Mar 2014 08:41:07 +0000 (08:41 +0000)]
Sync README.DEVELOPER and .travis.yml

Minimize the number and size of dependencies and remove redundant
packages from the list.