Did anyone have a chance to look at this EFI_SHELL_PROTOCOL bug in the EDK2 
implementation?

Thanks,

Tim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Tim Lewis
Sent: Thursday, October 13, 2016 11:16 AM
To: edk2-devel-01 <edk2-devel@lists.01.org>
Subject: [edk2] [shell] Problems in EfiShellGetGuidFromName

In EfiShellGetGuidFromName (ShellProtocol.c), we see:

EfiShellGetGuidFromName(
  IN  CONST CHAR16   *GuidName,
  OUT       EFI_GUID *Guid
  )
{
  EFI_GUID    *NewGuid;
  EFI_STATUS  Status;

  if (Guid == NULL || GuidName == NULL) {
    return (EFI_INVALID_PARAMETER);
  }

  Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
  if (!EFI_ERROR(Status)) {
    CopyGuid(NewGuid, Guid);
  }
  return (Status);

However, this doesn't work. Notice that CopyGuid places the output parameter as 
the 2nd parameter. But according to BaseMemoryLib:

GUID *
EFIAPI
CopyGuid (
  OUT GUID       *DestinationGuid,
  IN CONST GUID  *SourceGuid
  );

The destination should be the 1st parameter (not the second).



_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to