mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-08 11:00:50 +02:00
ba0122628c
On CHERI casting mp_int pointers to wc_ptr_t for the bitmask arithmetic strips the hardware capability tag. The reconstructed pointer won't have a valid tag and will cause a tag violation when it is dereferenced. Under __CHERI_PURE_CAPABILITY__, replace the pointer arithmetic with four mp_cond_copy calls that operate on the digit data directly. This preserves the capability tags and accesses both accumulators unconditionally. Non-CHERI builds retain the original wc_off_on_addr path unchanged. Signed-off-by: William Beasley (The Capable Hub) <wbeasley@thegoodpenguin.co.uk>