The example was for an older version of the code which used triadic
macros to define the functions. The code was simplified making these
dyadic but the example was skipped. This fixes the example.
Fixes: cccfc668286c "doc: document the internal integer overflow helpers"
References:
b037e3637a49 "header: add integer overflow helper functions"
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Mar 11 10:19:05 2026
(Merged from https://github.com/openssl/openssl/pull/30266)
(cherry picked from commit
77f1718f6f81aa269f8b46a7ba6d186c3477215a)
has a four byte element count which is followed by that many elements.
It returns zero on overflow.
- OSSL_SAFE_MATH_UNSIGNED(sizet, size_t, SIZE_MAX)
+ OSSL_SAFE_MATH_UNSIGNED(sizet, size_t)
size_t compute_record_size(uint32_t n)
{