Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:Update
grub2.35956
0002-commands-efi-tpm-Use-grub_strcpy-instead-o...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-commands-efi-tpm-Use-grub_strcpy-instead-of-grub_mem.patch of Package grub2.35956
From 974b90795cae39ced3f8d5652caafbeb16899b07 Mon Sep 17 00:00:00 2001 From: Lu Ken <ken.lu@intel.com> Date: Wed, 13 Jul 2022 10:06:11 +0800 Subject: [PATCH 2/3] commands/efi/tpm: Use grub_strcpy() instead of grub_memcpy() The event description is a string, so using grub_strcpy() is cleaner than using grub_memcpy(). Signed-off-by: Lu Ken <ken.lu@intel.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> --- grub-core/commands/efi/tpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c index e6953e3f5..8fe3101f3 100644 --- a/grub-core/commands/efi/tpm.c +++ b/grub-core/commands/efi/tpm.c @@ -176,7 +176,7 @@ grub_tpm1_log_event (grub_efi_handle_t tpm_handle, unsigned char *buf, event->PCRIndex = pcr; event->EventType = EV_IPL; event->EventSize = grub_strlen (description) + 1; - grub_memcpy (event->Event, description, event->EventSize); + grub_strcpy ((char *) event->Event, description); algorithm = TCG_ALG_SHA; status = efi_call_7 (tpm->log_extend_event, tpm, (grub_addr_t) buf, (grub_uint64_t) size, @@ -213,7 +213,7 @@ grub_tpm2_log_event (grub_efi_handle_t tpm_handle, unsigned char *buf, event->Header.EventType = EV_IPL; event->Size = sizeof (*event) - sizeof (event->Event) + grub_strlen (description) + 1; - grub_memcpy (event->Event, description, grub_strlen (description) + 1); + grub_strcpy ((char *) event->Event, description); status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, (grub_addr_t) buf, (grub_uint64_t) size, event); -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor