View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000594 | file | General | public | 2024-12-19 16:07 | 2024-12-19 16:07 |
Reporter | Ange | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 5.46 | ||||
Summary | 0000594: The SQLite3 magic detection is too broad | ||||
Description | File doesn't check the final 0x00 of the magic SQLite3 signature. | ||||
Steps To Reproduce | - the attached file gives with SQLite3 "Error: File is not a database" - scan the file. - get 'fake.db: SQLite 3.x database, last written using SQLite version 3045003, file counter 1, database pages 2, cookie 0x1, schema 4, UTF-8, version-valid-for 1' | ||||
Additional Information | The official format specifies that the magic ends with an null byte: "SQLite format 3\000" cf https://www.sqlite.org/fileformat.html The test file starts with "SQLite format 3\x20" (0x20 instead of 0x00). The following patch will fix that: 0 string SQLite\ format\ 3\0 in https://github.com/file/file/blob/0e273e409dc20fd566bb073db89efc86630f8516/magic/Magdir/sql#L109 | ||||
Tags | No tags attached. | ||||