AudioDxe: Fix DevicePath not to contain padding

This commit is contained in:
vit9696 2021-07-16 13:08:16 +03:00
parent 554c7cbd19
commit f61a1a35cb
3 changed files with 9 additions and 2 deletions

View File

@ -4,6 +4,7 @@ OpenCore Changelog
- Fixed OSBundleLibraries/OSBundleLibaries64 handling
- Added `GraphicsInputMirroring` to fix lost keystrokes in some non-Apple graphical UEFI apps
- Added support for stack canaries (security cookies / stack guards)
- Fixed unintialised memory access in AudioDxe causing audio playback failure
#### v0.7.1
- Added `SyncTableIds` quirk to sync modified table OEM identifiers

View File

@ -209,9 +209,15 @@ typedef struct {
///
/// Codec address.
///
UINT8 Address;
UINT32 Address;
} EFI_HDA_IO_DEVICE_PATH;
STATIC_ASSERT (
sizeof(EFI_HDA_IO_DEVICE_PATH)
== sizeof(EFI_DEVICE_PATH_PROTOCOL) + sizeof (EFI_GUID) + sizeof (UINT32),
"Unexpected EFI_HDA_IO_DEVICE_PATH size"
);
extern EFI_GUID gEfiHdaIoDevicePathGuid;
/**

View File

@ -488,7 +488,7 @@ HdaControllerScanCodecs (
HdaIoDevicePathNode.Header.Length[0] = (UINT8)(sizeof (EFI_HDA_IO_DEVICE_PATH));
HdaIoDevicePathNode.Header.Length[1] = (UINT8)((sizeof (EFI_HDA_IO_DEVICE_PATH)) >> 8);
HdaIoDevicePathNode.Guid = gEfiHdaIoDevicePathGuid;
HdaIoDevicePathNode.Address = (UINT8) Index;
HdaIoDevicePathNode.Address = Index;
HdaControllerDev->HdaIoChildren[Index].DevicePath = AppendDevicePathNode (HdaControllerDev->DevicePath, (EFI_DEVICE_PATH_PROTOCOL*)&HdaIoDevicePathNode);
if (HdaControllerDev->HdaIoChildren[Index].DevicePath == NULL) {
Status = EFI_INVALID_PARAMETER;