View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000115 | file | General | public | 2019-10-28 17:21 | 2019-11-02 18:15 |
Reporter | ikrivosheev | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 5.37 | ||||
Summary | 0000115: PDF file detect fix | ||||
Description | A pdf file is defined as "text/c-x". | ||||
Tags | No tags attached. | ||||
|
0001-Detect-pdf-fix.patch (1,218 bytes)
From db8dbf5a535358804d88e89cdcff6f5b3164f8a1 Mon Sep 17 00:00:00 2001 From: Ivan Krivosheev <py.krivosheev@gmail.com> Date: Mon, 28 Oct 2019 20:11:35 +0300 Subject: [PATCH] Detect pdf fix --- magic/Magdir/pdf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/magic/Magdir/pdf b/magic/Magdir/pdf index 5a67e86..3f44d17 100644 --- a/magic/Magdir/pdf +++ b/magic/Magdir/pdf @@ -4,19 +4,19 @@ # pdf: file(1) magic for Portable Document Format # -0 string %PDF- PDF document +0 string %PDF PDF document !:mime application/pdf !:strength +60 >5 byte x \b, version %c >7 byte x \b.%c -0 string \012%PDF- PDF document +0 string \012%PDF PDF document !:mime application/pdf !:strength +60 >6 byte x \b, version %c >8 byte x \b.%c -0 string \xef\xbb\xbf%PDF- PDF document (UTF-8) +0 string \xef\xbb\xbf%PDF PDF document (UTF-8) !:mime application/pdf !:strength +60 >6 byte x \b, version %c @@ -30,7 +30,7 @@ >5 byte x \b, version %c >7 byte x \b.%c -0 search/256 %PDF- PDF document +0 search/256 %PDF PDF document !:mime application/pdf !:strength +60 >&0 byte x \b, version %c -- 2.7.4 |
|
My guess is that this is some hand-crafted pdf file that does not follow the standard. Instead of fixing the magic I suggest that you ask the author to change his file. Quiting from: https://en.wikipedia.org/wiki/PDF: A PDF file is a 7-bit ASCII file, except for certain elements that may have binary content. A PDF file starts with a header containing the magic number and the version of the format such as %PDF-1.7. The format is a subset of a COS ("Carousel" Object Structure) format.[15] A COS tree file consists primarily of objects, of which there are eight types:[16] |
|
Ok, I think we can close issue. |
|
Won't fix. Problem with hand-crafted PDF file. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-10-28 17:21 | ikrivosheev | New Issue | |
2019-10-28 17:21 | ikrivosheev | File Added: foxit-reader-9.0.1.1049.pdf | |
2019-10-28 17:21 | ikrivosheev | File Added: 0001-Detect-pdf-fix.patch | |
2019-10-30 03:02 | christos | Assigned To | => christos |
2019-10-30 03:02 | christos | Status | new => feedback |
2019-10-30 03:02 | christos | Note Added: 0003322 | |
2019-10-30 14:38 | ikrivosheev | Note Added: 0003324 | |
2019-10-30 14:38 | ikrivosheev | Status | feedback => assigned |
2019-11-02 18:15 | christos | Status | assigned => resolved |
2019-11-02 18:15 | christos | Resolution | open => fixed |
2019-11-02 18:15 | christos | Note Added: 0003326 |