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

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

  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: c167983269efea389583838c4e291717071840ff
  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