lib/hcrypto: BN_set_word return false if input 'bn' is NULL
commit19eae8b4a99e2baea5c3959bfefbc394411e347f
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 16 Jan 2022 04:15:21 +0000 (15 23:15 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 16 Jan 2022 04:17:26 +0000 (15 23:17 -0500)
tree95fd76d776db58919abfabdd5b13a2edbee741bb
parentb8450a04a1eca4adeb4343da16ac76d145839b31
lib/hcrypto: BN_set_word return false if input 'bn' is NULL

If the input 'bn' is NULL then BN_bin2bn() will allocate and
return a BIGNUM which will then be leaked.   BN_set_word()
would then return true even though it didn't set the word
into a BIGNUM known to the caller.

Change-Id: I6681f548e6bfb330cec009ae7c18e6151016179e
lib/hcrypto/bn.c