<div dir="ltr">Hi maintainers,<br><br>I am reporting an integer overflow vulnerability in libmagic (file-5.17) where the buffer size calculation `(nbytes + 1) * sizeof(unichar)` in `file_encoding()` (encoding.c:79-80) overflows on 32-bit platforms, causing `calloc` to allocate only 8 bytes while `looks_ascii()` writes past it, resulting in a heap buffer overflow.<br><br>Please find the detailed vulnerability report and proof-of-concept files attached.<br><br>Best regards</div>