<div dir="ltr">Hi maintainers,<br><br>I am reporting an integer overflow vulnerability in libmagic (file-5.17) where the calculation `mlen = ulen * 6` in `file_ascmagic_with_encoding()` (ascmagic.c:141-142) overflows on 32-bit platforms, causing an undersized `malloc`. The heap corruption is mitigated by bounds checking in `encode_utf8()`, but the overflow results in a logic error / denial of service.<br><br>Please find the detailed vulnerability report and proof-of-concept files attached.<br><br>Best regards<br></div>