mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
crypto: padlock - Use zero page instead of stack buffer
Use desc instead of a stack buffer in the final function. This fixes a compiler warning about buf being uninitialised. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -125,7 +125,7 @@ out:
|
||||
|
||||
static int padlock_sha1_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
u8 buf[4];
|
||||
const u8 *buf = (void *)desc;
|
||||
|
||||
return padlock_sha1_finup(desc, buf, 0, out);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ out:
|
||||
|
||||
static int padlock_sha256_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
u8 buf[4];
|
||||
const u8 *buf = (void *)desc;
|
||||
|
||||
return padlock_sha256_finup(desc, buf, 0, out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user