bn2binpad: Use memset as the buffer will be used later
authorTomas Mraz <tomas@openssl.org>
Wed, 8 Dec 2021 17:26:03 +0000 (18:26 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 13 Dec 2021 10:33:25 +0000 (11:33 +0100)
commit110b005465f3d3edb0fe0f61b87595d011770317
tree908e3716cfb143b670a07b8448665e2ad90dbe80
parentbfa90fcaeaef775d0dfa5da3c0ad7da9f09fb60d
bn2binpad: Use memset as the buffer will be used later

Apparently using OPENSSL_cleanse() confuses the fuzzer so it
makes the buffer to appear uninitialized. And memset can be
safely used here and it is also potentially faster.

Fixes #17237

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/17240)

(cherry picked from commit 858d5ac16d256db24f78b8c84e723b7d34c8b1ea)
crypto/bn/bn_lib.c