Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.27k stars 692 forks source link

cli_check_mydoom_log: Avoid unaligned access. #1293

Closed sebastianas closed 2 months ago

sebastianas commented 3 months ago

fmap_need_off_once() may return an unaligned pointer. This in return leads to an unaligned access during the load of the uint32_t variables loading to failures on architectures not supporting unaligned access.

This was reported to the Debian BTS as #1073128.

[bigeasy: Commit message, reworked the patch a bit].

Link: https://bugs.debian.org/1073128

sebastianas commented 3 months ago

This just built in Debian and it also fixed a long standing issue on sparc64 which existed since the 1.0.0 version.

LocutusOfBorg commented 3 months ago

thanks for the nice and quick fix!