[File] Matching metadata near the end of a large file

Toni Ruottu toni.ruottu at iki.fi
Wed Aug 3 18:35:28 UTC 2022


  Hi!

I'm trying to create magic for a file format that stores some metadata
close to the end of the file. There is a pointer to the metadata near the
beginning, so I do know the offset where the metadata is located. However,
the file command seems to give up around offset 0x100000 refusing to match
any data past that point. The debug mode shows only zeros instead of the
actual data.

Have I encountered a bug or is this a known limitation? What would be a
good approach to take? Should I test my magic with a tiny file and ignore
the potential failure due to file size? The files I'm trying to process are
quite large and would typically not fit entirely within the first 0x100000
bytes.

  --Toni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20220803/03234632/attachment.htm>


More information about the File mailing list