]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
safe_math: documentation example fix
authorPauli <paul.dale@oracle.com>
Wed, 4 Mar 2026 23:28:15 +0000 (10:28 +1100)
committerTomas Mraz <tomas@openssl.org>
Wed, 11 Mar 2026 10:19:18 +0000 (11:19 +0100)
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)

doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod

index 16bd7f205c2ddffa60cb254698824e602e5a222f..740555e6adb8aa12eb544ebeb4e2360c15f5c11e 100644 (file)
@@ -80,7 +80,7 @@ This example is of a function that computes the size of a record that
 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)
  {