mirror of https://github.com/Cisco-Talos/clamav
Fix mmap failed(2) on 32-bit FreeBSD (bb #2300).
off_t is 64-bit, size_t is still 32-bit and that causes unexpected integer promotion here: map_off = map->len - 2048 First the unsigned subtraction is performed, and then the unsigned (!) value is sign-extended to 64-bit. Hence a negative value becomes positive, which is wrong.0.96
parent
9f021791d1
commit
8f6bf9fc08
Loading…
Reference in new issue