]> granicus.if.org Git - file/log
file
6 years agoAdd FreeBSD-specific core file support (John Baldwin)
Christos Zoulas [Tue, 11 Sep 2018 00:37:33 +0000 (00:37 +0000)]
Add FreeBSD-specific core file support (John Baldwin)

6 years agoRemove trailing whitespace
Christos Zoulas [Sun, 9 Sep 2018 20:33:28 +0000 (20:33 +0000)]
Remove trailing whitespace
XXX: We can't do this yet from magic files because trailing whitespace is
significant.

6 years agoFix use-after-free (https://runtimeverification.com/). The free code was
Christos Zoulas [Sat, 1 Sep 2018 15:52:02 +0000 (15:52 +0000)]
Fix use-after-free (https://runtimeverification.com/). The free code was
never changed when the mlist was changed from a NULL-terminated list to
a circular one.

6 years agouse unsigned to print size (Francesco Lamonica)
Christos Zoulas [Sat, 1 Sep 2018 13:52:39 +0000 (13:52 +0000)]
use unsigned to print size (Francesco Lamonica)

6 years agoavoid accessing memory beyond the end of the buffer (found by oss-fuzz)
Christos Zoulas [Mon, 27 Aug 2018 06:17:23 +0000 (06:17 +0000)]
avoid accessing memory beyond the end of the buffer (found by oss-fuzz)

6 years agoreduce strenght to lose from infocom z commands
Christos Zoulas [Tue, 21 Aug 2018 12:48:41 +0000 (12:48 +0000)]
reduce strenght to lose from infocom z commands

6 years agoProvide a mime type for MPEG transport stream from:
Christos Zoulas [Tue, 21 Aug 2018 12:48:06 +0000 (12:48 +0000)]
Provide a mime type for MPEG transport stream from:
https://en.wikipedia.org/wiki/MPEG_transport_stream

6 years agorevert previous: we cannot default for mime/apple/etc on the first printed desc,
Christos Zoulas [Tue, 21 Aug 2018 08:58:16 +0000 (08:58 +0000)]
revert previous: we cannot default for mime/apple/etc on the first printed desc,
because they might be overriden later.

6 years agonew fixes
Christos Zoulas [Mon, 20 Aug 2018 15:42:03 +0000 (15:42 +0000)]
new fixes

6 years agoPR/30: cbiedl: Allow all parameter values to be set.
Christos Zoulas [Mon, 20 Aug 2018 15:39:32 +0000 (15:39 +0000)]
PR/30: cbiedl: Allow all parameter values to be set.

6 years agoremove debugging printf
Christos Zoulas [Mon, 20 Aug 2018 12:21:39 +0000 (12:21 +0000)]
remove debugging printf

6 years agodon't use defaults if we are inside a USE entry.
Christos Zoulas [Mon, 20 Aug 2018 12:17:30 +0000 (12:17 +0000)]
don't use defaults if we are inside a USE entry.

6 years agoIt used to be the case that if a magic entry was found (with non-nul
Christos Zoulas [Mon, 20 Aug 2018 10:08:18 +0000 (10:08 +0000)]
It used to be the case that if a magic entry was found (with non-nul
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.

6 years agosimplify numeric parsing (found by oss-fuzz)
Christos Zoulas [Mon, 20 Aug 2018 08:06:54 +0000 (08:06 +0000)]
simplify numeric parsing (found by oss-fuzz)

6 years agohandle error properly.
Christos Zoulas [Sun, 19 Aug 2018 10:38:21 +0000 (10:38 +0000)]
handle error properly.

6 years agoTry to simplify and make the code more consistent by checking
Christos Zoulas [Sun, 19 Aug 2018 10:16:47 +0000 (10:16 +0000)]
Try to simplify and make the code more consistent by checking
    (print && *m->desc)
the same way.

6 years agodon't require the use to match for printing mime info
Christos Zoulas [Sun, 19 Aug 2018 10:15:25 +0000 (10:15 +0000)]
don't require the use to match for printing mime info

6 years agoAdd a default case in case we did not find the 4th file header.
Christos Zoulas [Sun, 19 Aug 2018 09:30:50 +0000 (09:30 +0000)]
Add a default case in case we did not find the 4th file header.

6 years ago- conditionalizing the return value on (print) is wrong and breaks mime.
Christos Zoulas [Sun, 19 Aug 2018 09:14:39 +0000 (09:14 +0000)]
- conditionalizing the return value on (print) is wrong and breaks mime.
- don't open-code the continuation printing.

6 years agodocument MAGIC_NO_CHECK_JSON
Christos Zoulas [Sat, 18 Aug 2018 14:44:48 +0000 (14:44 +0000)]
document MAGIC_NO_CHECK_JSON

6 years agodocument is_json.c
Christos Zoulas [Sat, 18 Aug 2018 11:45:05 +0000 (11:45 +0000)]
document is_json.c

6 years agoprevent overread (found by oss-fuzz)
Christos Zoulas [Fri, 17 Aug 2018 09:12:33 +0000 (09:12 +0000)]
prevent overread (found by oss-fuzz)

6 years agoAvoid read out of bounds (found by oss-fuzz)
Christos Zoulas [Mon, 13 Aug 2018 12:59:05 +0000 (12:59 +0000)]
Avoid read out of bounds (found by oss-fuzz)

6 years ago- add stats
Christos Zoulas [Sat, 11 Aug 2018 14:43:43 +0000 (14:43 +0000)]
- add stats
- add recursion limit
- add bail early

6 years agoPR/25: cbiedl: Avoid strength underflow.
Christos Zoulas [Sat, 11 Aug 2018 12:17:37 +0000 (12:17 +0000)]
PR/25: cbiedl: Avoid strength underflow.

6 years agoAdd more tests
Christos Zoulas [Sat, 11 Aug 2018 12:12:39 +0000 (12:12 +0000)]
Add more tests

6 years agofix exponent parsing.
Christos Zoulas [Sat, 11 Aug 2018 12:11:11 +0000 (12:11 +0000)]
fix exponent parsing.

6 years ago- keep track of the nesting level
Christos Zoulas [Sat, 11 Aug 2018 12:05:24 +0000 (12:05 +0000)]
- keep track of the nesting level
- be pickier about parsing numbers
- only report as JSON objects and arrays; not plain elements.

6 years agoPR/26: Include the line terminator character so that regex's that match
Christos Zoulas [Sat, 11 Aug 2018 11:44:24 +0000 (11:44 +0000)]
PR/26: Include the line terminator character so that regex's that match
to the end of line work.

6 years agoPR/27: cbiedl: Fix HPROF detection on big endian
Christos Zoulas [Sat, 11 Aug 2018 11:32:15 +0000 (11:32 +0000)]
PR/27: cbiedl: Fix HPROF detection on big endian

6 years agoDon't print the mime type when only encoding was requested.
Christos Zoulas [Sat, 11 Aug 2018 11:06:19 +0000 (11:06 +0000)]
Don't print the mime type when only encoding was requested.

6 years agomention JSON
Christos Zoulas [Sat, 11 Aug 2018 11:03:37 +0000 (11:03 +0000)]
mention JSON

6 years agoAdd a simple JSON parser...
Christos Zoulas [Sat, 11 Aug 2018 11:02:47 +0000 (11:02 +0000)]
Add a simple JSON parser...

6 years agoremove extra parens
Christos Zoulas [Fri, 3 Aug 2018 09:00:13 +0000 (09:00 +0000)]
remove extra parens

6 years agorestructure to reduce code
Christos Zoulas [Thu, 2 Aug 2018 12:53:51 +0000 (12:53 +0000)]
restructure to reduce code

6 years agocorrect error handling for file_printf() (coverity)
Christos Zoulas [Thu, 2 Aug 2018 12:46:02 +0000 (12:46 +0000)]
correct error handling for file_printf() (coverity)

6 years agoNew hardware magic
Christos Zoulas [Thu, 2 Aug 2018 06:33:05 +0000 (06:33 +0000)]
New hardware magic

6 years agonew EDID magic
Christos Zoulas [Thu, 2 Aug 2018 06:32:52 +0000 (06:32 +0000)]
new EDID magic

6 years agoPR/10: Add sketchup.
Christos Zoulas [Thu, 2 Aug 2018 06:23:27 +0000 (06:23 +0000)]
PR/10: Add sketchup.

6 years agofix reMarkable.
Christos Zoulas [Wed, 1 Aug 2018 12:43:51 +0000 (12:43 +0000)]
fix reMarkable.

6 years agoPR/16: Add autocad dxf magic
Christos Zoulas [Wed, 1 Aug 2018 12:05:00 +0000 (12:05 +0000)]
PR/16: Add autocad dxf magic

6 years agoPR/19: Recognize ia64 and amd64 COFF files
Christos Zoulas [Wed, 1 Aug 2018 10:34:03 +0000 (10:34 +0000)]
PR/19: Recognize ia64 and amd64 COFF files

6 years agoPR/21: Add PNG extension
Christos Zoulas [Wed, 1 Aug 2018 10:32:40 +0000 (10:32 +0000)]
PR/21: Add PNG extension

6 years agoPR/22: remove accidentally added line.
Christos Zoulas [Wed, 1 Aug 2018 10:31:07 +0000 (10:31 +0000)]
PR/22: remove accidentally added line.

6 years agoWe don't want to do anything here on errors (since we are already printing
Christos Zoulas [Wed, 1 Aug 2018 10:21:19 +0000 (10:21 +0000)]
We don't want to do anything here on errors (since we are already printing
errors), so ignore. For coverity.

6 years agoPortability fix, don't call qsort with NULL/0. Found by coverity
Christos Zoulas [Wed, 1 Aug 2018 10:18:02 +0000 (10:18 +0000)]
Portability fix, don't call qsort with NULL/0. Found by coverity

6 years agoremove useless assignment found by coverity
Christos Zoulas [Wed, 1 Aug 2018 10:14:10 +0000 (10:14 +0000)]
remove useless assignment found by coverity

6 years agomake MULT unsigned.
Christos Zoulas [Wed, 1 Aug 2018 10:12:59 +0000 (10:12 +0000)]
make MULT unsigned.

6 years agoappease coverity by calling umask around mkstemp(3)
Christos Zoulas [Wed, 1 Aug 2018 10:11:16 +0000 (10:11 +0000)]
appease coverity by calling umask around mkstemp(3)

6 years agocheck file_printf()
Christos Zoulas [Wed, 1 Aug 2018 10:09:47 +0000 (10:09 +0000)]
check file_printf()

6 years agoEliminate toctou by using fstat and always opening with non-blocking i/o.
Christos Zoulas [Wed, 1 Aug 2018 10:07:00 +0000 (10:07 +0000)]
Eliminate toctou by using fstat and always opening with non-blocking i/o.
Found by coverity.

6 years agobetter error handling, found by coverity.
Christos Zoulas [Wed, 1 Aug 2018 10:02:20 +0000 (10:02 +0000)]
better error handling, found by coverity.

6 years agofix leak on error, found by coverity.
Christos Zoulas [Wed, 1 Aug 2018 09:59:45 +0000 (09:59 +0000)]
fix leak on error, found by coverity.

6 years agocheck against -1 to appease coverity.
Christos Zoulas [Wed, 1 Aug 2018 09:56:24 +0000 (09:56 +0000)]
check against -1 to appease coverity.

6 years agotry to use the "right" off_t_max
Christos Zoulas [Wed, 1 Aug 2018 09:53:18 +0000 (09:53 +0000)]
try to use the "right" off_t_max

6 years agoPR/20: Tar files with --mime-encoding shoukd not print mime type
Christos Zoulas [Wed, 1 Aug 2018 08:50:20 +0000 (08:50 +0000)]
PR/20: Tar files with --mime-encoding shoukd not print mime type

6 years agoAdd a comment for the return values of the magic functions.
Christos Zoulas [Fri, 27 Jul 2018 11:04:51 +0000 (11:04 +0000)]
Add a comment for the return values of the magic functions.

6 years agoSince this is an elf file and we produced some information for it, return 1
Christos Zoulas [Fri, 27 Jul 2018 07:50:14 +0000 (07:50 +0000)]
Since this is an elf file and we produced some information for it, return 1
instead of 0. Reported by Kamil Dudka

6 years agofix name.
Christos Zoulas [Fri, 27 Jul 2018 07:41:14 +0000 (07:41 +0000)]
fix name.

6 years agonew magic for the remarkable table.
Christos Zoulas [Thu, 26 Jul 2018 08:28:56 +0000 (08:28 +0000)]
new magic for the remarkable table.

6 years agomention PR/18 fix
Christos Zoulas [Wed, 25 Jul 2018 07:18:09 +0000 (07:18 +0000)]
mention PR/18 fix

6 years agoPR/18: Anonymous: calling file with --mime-encoding on CDF files should not
Christos Zoulas [Wed, 25 Jul 2018 07:16:21 +0000 (07:16 +0000)]
PR/18: Anonymous: calling file with --mime-encoding on CDF files should not
print mime-type..

6 years agoPR/17: Christoph Biedl: Add more ms == NULL checks for consistency.
Christos Zoulas [Wed, 25 Jul 2018 06:27:09 +0000 (06:27 +0000)]
PR/17: Christoph Biedl: Add more ms == NULL checks for consistency.

6 years agoPR/11: Mention that magic_file and magic_buffer can produce different
Christos Zoulas [Wed, 25 Jul 2018 06:23:22 +0000 (06:23 +0000)]
PR/11: Mention that magic_file and magic_buffer can produce different
results.

6 years agomore gw->astron
Christos Zoulas [Wed, 25 Jul 2018 06:17:15 +0000 (06:17 +0000)]
more gw->astron

6 years agoPR/9: Christoph Bield: Handle files without program headers gracefully
Christos Zoulas [Wed, 25 Jul 2018 06:12:09 +0000 (06:12 +0000)]
PR/9: Christoph Bield: Handle files without program headers gracefully

6 years agoFrom Dave Odell:
Christos Zoulas [Wed, 25 Jul 2018 06:05:34 +0000 (06:05 +0000)]
From Dave Odell:
- Better extensions for Windows and DOS executables.
- 16-bit Windows DLLs no longer mistagged as drivers.

6 years agoAdd more files. FILE5_34
Christos Zoulas [Wed, 25 Jul 2018 05:55:41 +0000 (05:55 +0000)]
Add more files.

6 years agofix for file rename
Christos Zoulas [Wed, 25 Jul 2018 05:54:11 +0000 (05:54 +0000)]
fix for file rename

6 years agoprepare for 5.34
Christos Zoulas [Wed, 25 Jul 2018 05:51:20 +0000 (05:51 +0000)]
prepare for 5.34

6 years agoupdate bug tracker and mailing list info.
Christos Zoulas [Tue, 24 Jul 2018 21:33:56 +0000 (21:33 +0000)]
update bug tracker and mailing list info.

6 years agomore info for ppc swapspace (Kamil Dudka)
Christos Zoulas [Mon, 16 Jul 2018 12:32:08 +0000 (12:32 +0000)]
more info for ppc swapspace (Kamil Dudka)

6 years agoremember to put a space between the version and the number, plus more
Christos Zoulas [Mon, 16 Jul 2018 12:30:41 +0000 (12:30 +0000)]
remember to put a space between the version and the number, plus more
version parsing (Kamil Dudka)

6 years agoAdd extension and mime for windows metafiles (dmo2118)
Christos Zoulas [Tue, 10 Jul 2018 04:05:50 +0000 (04:05 +0000)]
Add extension and mime for windows metafiles (dmo2118)

6 years agoPrint the Go Build-ID like we do for other elf binaries
Christos Zoulas [Sun, 8 Jul 2018 23:37:33 +0000 (23:37 +0000)]
Print the Go Build-ID like we do for other elf binaries

6 years agoNew magic from Thomas Kaeding
Christos Zoulas [Tue, 3 Jul 2018 20:55:37 +0000 (20:55 +0000)]
New magic from Thomas Kaeding

6 years agoFix pasto (Clemens Gruber)
Christos Zoulas [Tue, 26 Jun 2018 20:29:29 +0000 (20:29 +0000)]
Fix pasto (Clemens Gruber)

6 years agoFix dumpdate reversed order (Oleksandr Tymoshenko)
Christos Zoulas [Tue, 26 Jun 2018 01:07:17 +0000 (01:07 +0000)]
Fix dumpdate reversed order (Oleksandr Tymoshenko)

6 years agofix tab issue
Christos Zoulas [Sun, 24 Jun 2018 15:50:41 +0000 (15:50 +0000)]
fix tab issue

6 years agoFix comma vs. colon for DDS and PVRX. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:42:02 +0000 (16:42 +0000)]
Fix comma vs. colon for DDS and PVRX. (David Korth)

6 years agoUse the MS DirectDraw Surface lines for Sega PVRX. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:41:55 +0000 (16:41 +0000)]
Use the MS DirectDraw Surface lines for Sega PVRX. (David Korth)

6 years agoAdded more detail about the DDS file format:
Christos Zoulas [Sat, 23 Jun 2018 16:41:47 +0000 (16:41 +0000)]
Added more detail about the DDS file format:
- Indicate compression, alpha-only, YUV, and luminance.
  Previously, all DDS textures were assumed to be compressed.
- For uncompressed RGB, attempt to decode the format using the channel masks.
(David Korth)

6 years agoMoved Microsoft DirectDraw Surface from msdos to images.
Christos Zoulas [Sat, 23 Jun 2018 16:41:10 +0000 (16:41 +0000)]
Moved Microsoft DirectDraw Surface from msdos to images.
These are used on more than just Microsoft operating systems,
and will be needed for extended information for Sega's PVRX format.
(David Korth)

6 years agoAdded detection for GameCube/Wii disc images with SDK headers. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:40:40 +0000 (16:40 +0000)]
Added detection for GameCube/Wii disc images with SDK headers. (David Korth)

6 years agoDetect unencrypted Wii games. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:40:22 +0000 (16:40 +0000)]
Detect unencrypted Wii games. (David Korth)

6 years agoUse 'default' to reduce complexity. Fix a few typos. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:40:11 +0000 (16:40 +0000)]
Use 'default' to reduce complexity. Fix a few typos. (David Korth)

6 years agoAdded Wii U Cafe OS ABI detection and file type detection for RPX executables.
Christos Zoulas [Sat, 23 Jun 2018 16:39:53 +0000 (16:39 +0000)]
Added Wii U Cafe OS ABI detection and file type detection for RPX executables.
(David Korth)

6 years agoAdded ASTC texture format detection. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:39:21 +0000 (16:39 +0000)]
Added ASTC texture format detection. (David Korth)

6 years agoAdded Valve VTF3 (PS3) detection. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:38:52 +0000 (16:38 +0000)]
Added Valve VTF3 (PS3) detection. (David Korth)

6 years agoAdded Valve Texture Format (VTF) detection.
Christos Zoulas [Sat, 23 Jun 2018 16:38:43 +0000 (16:38 +0000)]
Added Valve Texture Format (VTF) detection.
Prints width, height, depth, mipmap count, and format. (David Korth)

6 years agoHeight and depth may be 1 for 1D and/or 2D textures. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:38:10 +0000 (16:38 +0000)]
Height and depth may be 1 for 1D and/or 2D textures. (David Korth)

6 years agoAdded Khronos KTX texture detection.
Christos Zoulas [Sat, 23 Jun 2018 16:38:01 +0000 (16:38 +0000)]
Added Khronos KTX texture detection.
Prints width, height, depth, and detects most common formats. (David Korth)

6 years agoAdded Mozilla Mork databases. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:37:21 +0000 (16:37 +0000)]
Added Mozilla Mork databases. (David Korth)

6 years agoSome Sega Wii games have GVR with GCIX instead of GBIX. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:37:13 +0000 (16:37 +0000)]
Some Sega Wii games have GVR with GCIX instead of GBIX. (David Korth)

6 years agoSome Sega Wii games have GVR with GCIX instead of GBIX. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:36:47 +0000 (16:36 +0000)]
Some Sega Wii games have GVR with GCIX instead of GBIX. (David Korth)

6 years agoAdded unofficial MIME types from xdg/shared-mime-info. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:36:37 +0000 (16:36 +0000)]
Added unofficial MIME types from xdg/shared-mime-info. (David Korth)

6 years agoText fields are fixed at 32 characters and may not have NULL terminators.
Christos Zoulas [Sat, 23 Jun 2018 16:36:27 +0000 (16:36 +0000)]
Text fields are fixed at 32 characters and may not have NULL terminators.
(David Korth)

6 years agoDetect encrypted ADXes. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:36:15 +0000 (16:36 +0000)]
Detect encrypted ADXes. (David Korth)

6 years agoAdded CRI ADX detection. (David Korth)
Christos Zoulas [Sat, 23 Jun 2018 16:36:04 +0000 (16:36 +0000)]
Added CRI ADX detection. (David Korth)

6 years agoone more syscall for 32 bits
Christos Zoulas [Sat, 23 Jun 2018 16:19:02 +0000 (16:19 +0000)]
one more syscall for 32 bits