[openssl/openssl] a2b01a: Fix incorrect check on RAND_bytes_ex() in generate...

Niels Dossche noreply at github.com
Mon Jan 23 09:42:19 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: a2b01ae1c84ccc250d5d5cb5f2f8714573e3f11b
      https://github.com/openssl/openssl/commit/a2b01ae1c84ccc250d5d5cb5f2f8714573e3f11b
  Author: Niels Dossche <niels.dossche at ugent.be>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    M crypto/ffc/ffc_params_generate.c

  Log Message:
  -----------
  Fix incorrect check on RAND_bytes_ex() in generate_q_fips186_4()

RAND_bytes_ex() can also return 0 on failure. Other callers do check
this correctly. Change the check from <0 to <=0.

Fixes: #20100

CLA: trivial

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20106)




More information about the openssl-commits mailing list