libtommath: Fix possible integer overflow CVE-2023-36328