[openssl/openssl] d76fc9: doc: clarify SSL_CIPHER_description allocation

Daniel McCarney noreply at github.com
Mon Apr 29 09:09:31 UTC 2024


  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: d76fc993a9a83ce251040f3fe30f5f38a980b115
      https://github.com/openssl/openssl/commit/d76fc993a9a83ce251040f3fe30f5f38a980b115
  Author: Daniel McCarney <daniel at binaryparadox.net>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M doc/man3/SSL_CIPHER_get_name.pod

  Log Message:
  -----------
  doc: clarify SSL_CIPHER_description allocation

Previously the documentation for `SSL_CIPHER_description` said:
> If buf is provided, it must be at least 128 bytes, otherwise a buffer
> will be allocated using OPENSSL_malloc().

In reality, `OPENSSL_malloc` is only invoked if the provided `buf`
argument is `NULL`. If the `buf` arg is not `NULL`, but smaller than
128 bytes, the function returns `NULL` without attempting to allocate
a new buffer for the description.

This commit adjusts the documentation to better describe the implemented
behaviour.

CLA: trivial

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
Reviewed-by: Paul Dale <ppzgs1 at gmail.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23921)

(cherry picked from commit 6a4a714045415be6720f4165c4d70a0ff229a26a)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list