imgact_elf: avoid mapsz overflow
(cherry picked from commit bf839416381cb9f63a8a82ea6e897a22830a8009)