From: Tomas Mraz Date: Thu, 13 Oct 2022 09:39:35 +0000 (+0200) Subject: Document the stack functions that are forgiving X-Git-Tag: openssl-3.2.0-alpha1~1851 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0778364f8ec1f9702e62e6298aaa212ec40b6111;p=thirdparty%2Fopenssl.git Document the stack functions that are forgiving I.e., those that can be called with NULL stack parameter or invalid index. Reviewed-by: Todd Short Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/19400) --- diff --git a/doc/man3/DEFINE_STACK_OF.pod b/doc/man3/DEFINE_STACK_OF.pod index 9cec9989249..12f033d977e 100644 --- a/doc/man3/DEFINE_STACK_OF.pod +++ b/doc/man3/DEFINE_STACK_OF.pod @@ -229,6 +229,13 @@ A failed search is indicated by a B<-1> return value. STACK_OF(), DEFINE_STACK_OF(), DEFINE_STACK_OF_CONST(), and DEFINE_SPECIAL_STACK_OF() are implemented as macros. +It is not an error to call B_num>(), B_value>(), +B_free>(), B_zero>(), B_pop_free>(), +B_delete>(), B_delete_ptr>(), B_pop>(), +B_shift>(), B_find>(), B_find_ex>(), +and B_find_all>() on a NULL stack, empty stack, or with +an invalid index. An error is not raised in these conditions. + The underlying utility B API should not be used directly. It defines these functions: OPENSSL_sk_deep_copy(), OPENSSL_sk_delete(), OPENSSL_sk_delete_ptr(), OPENSSL_sk_dup(),