[openssl/openssl] 45cada: apps/rehash.c: Add the check for the EVP_MD_get_si...

openssl-machine noreply at github.com
Wed Jul 10 16:25:57 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 45cada1339bacc81765b02367bdbaf878445081d
      https://github.com/openssl/openssl/commit/45cada1339bacc81765b02367bdbaf878445081d
  Author: Jiasheng Jiang <jiashengjiangcool at outlook.com>
  Date:   2024-07-10 (Wed, 10 Jul 2024)

  Changed paths:
    M apps/rehash.c

  Log Message:
  -----------
  apps/rehash.c: Add the check for the EVP_MD_get_size()

Add the check for the return value of EVP_MD_get_size() to avoid invalid negative
numbers and then explicitly cast from int to size_t.

Add the check to prevent that EVP_MD_get_size() returns a value greater
than EVP_MAX_MD_SIZE.

Signed-off-by: Jiasheng Jiang <jiashengjiangcool at outlook.com>

Reviewed-by: Neil Horman <nhorman at openssl.org>
Reviewed-by: Paul Dale <ppzgs1 at gmail.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24802)



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