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

Niels Dossche noreply at github.com
Mon Jan 23 09:43:21 UTC 2023


  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: 846d5099f3c3604e5a7d2710baafacdc73b44a24
      https://github.com/openssl/openssl/commit/846d5099f3c3604e5a7d2710baafacdc73b44a24
  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)

(cherry picked from commit a2b01ae1c84ccc250d5d5cb5f2f8714573e3f11b)




More information about the openssl-commits mailing list