[openssl/openssl] 8547cd: crypto/asn1/a_time.c: Add check for OPENSSL_malloc

Tomas Mraz noreply at reply.github.openssl.org
Fri Jun 17 06:51:41 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 8547cd6790881cbba0f20aa4ce048243065a24bf
      https://github.openssl.org/openssl/openssl/commit/8547cd6790881cbba0f20aa4ce048243065a24bf
  Author: Jiasheng Jiang <jiasheng at iscas.ac.cn>
  Date:   2022-06-17 (Fri, 17 Jun 2022)

  Changed paths:
    M crypto/asn1/a_time.c

  Log Message:
  -----------
  crypto/asn1/a_time.c: Add check for OPENSSL_malloc

As the potential failure of the OPENSSL_malloc(),
timestamp_tm could be NULL and be used in ASN1_TIME_to_tm()
without check.
Therefore, it should be better to check the return value of
OPENSSL_malloc() and return error if fails.

Signed-off-by: Jiasheng Jiang <jiasheng at iscas.ac.cn>

Reviewed-by: Todd Short <todd.short at me.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18575)




More information about the openssl-commits mailing list