mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
commands/verify: Fix sha1 context zeroing-out.
Current code doesn't zero-out context completely. It's a minor issue really as sha1 init already takes care of initing the context.
This commit is contained in:
1 parent
6079e67926
commit
37ba761b1c
1 file changed
+1
-1
@@ -308,7 +308,7 @@ grub_load_public_key (grub_file_t f)
|
|||||||
if (!sk)
|
if (!sk)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
grub_memset (fingerprint_context, 0, sizeof (fingerprint_context));
|
grub_memset (fingerprint_context, 0, GRUB_MD_SHA1->contextsize);
|
||||||
GRUB_MD_SHA1->init (fingerprint_context);
|
GRUB_MD_SHA1->init (fingerprint_context);
|
||||||
GRUB_MD_SHA1->write (fingerprint_context, "\x99", 1);
|
GRUB_MD_SHA1->write (fingerprint_context, "\x99", 1);
|
||||||
len_be = grub_cpu_to_be16 (len);
|
len_be = grub_cpu_to_be16 (len);
|
||||||
|
|||||||
Reference in new issue
Block a user