<div dir="ltr">Hi maintainers,<br><br>I am reporting an out-of-bounds read vulnerability in libmagic (file-5.17) where the minimum `.mgc` file size check in `apprentice_map()` (apprentice.c:2670) only requires 8 bytes, but the code subsequently reads `ptr[2]` and `ptr[3]` at offsets 8-15, causing an OOB read or SIGSEGV with any 8-15 byte `.mgc` file carrying a valid header.<br><br>Please find the detailed vulnerability report and proof-of-concept files attached.<br><br>Best regards<br></div>