crypto: akcipher - Do not copy dst if it is NULL
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 27 Jun 2023 09:59:32 +0000 (17:59 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 27 Jun 2023 09:59:52 +0000 (17:59 +0800)
commit486bfb05913ac9969a3a71a4dc48f17f31cb162d
tree52e12ccce05a85fd41db07c74aca5059dd8a7d84
parent891ebfdfa3d08bf55ebec523c99bb68ac9c34cf7
crypto: akcipher - Do not copy dst if it is NULL

As signature verification has a NULL destination buffer, the pointer
needs to be checked before the memcpy is done.

Fixes: addde1f2c966 ("crypto: akcipher - Add sync interface without SG lists")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/akcipher.c