[File] MAGIC_CONT flag on multiple magic files
driantervi
driantervi at proton.me
Tue Aug 16 17:14:50 UTC 2022
Hi all,
We have a use case where we need to load multiple magic files for detecting types, but we observed that MAGIC_CONTINUE flag doesn't look at rules beyond first matching magic file when there are more than one magic files loaded.
For illustration, when there are 2 magic files loaded as "magic1:magic2", using MAGIC_CONTINUE flag it output multiple hits on on magic1, but it didn't look rules on magic2.
We use the usual way of magic_open(MAGIC_CONTINUE) followed by magic_load and magic_file to get the final output.
It seems that the only way to get expected behavior with MAGIC_CONTINUE is not using multiple magic files in the first place, stick to using only one magic file by concatenating two magic files into one file before loading it, but concatenating before loading is rather inconvenient and less elegant when multiple file loading feature is actually available.
Tested this on 5.39. Found similar issue on https://bugs.astron.com/view.php?id=373
Thanks.
Sent with [Proton Mail](https://proton.me/) secure email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20220816/af934264/attachment-0001.htm>
More information about the File
mailing list