From 869da460920d65d4bca52d4456c413b52c816b37 Mon Sep 17 00:00:00 2001 From: Teddy Reed Date: Tue, 1 Oct 2024 09:58:57 -0400 Subject: [PATCH] fix: Update CompressionTypes typedefs --- .github/workflows/release.yml | 4 ++-- uefi_firmware/compression/Include/CompressionTypes.h | 4 ++-- uefi_firmware/compression/LZMA/LzmaDecompress.c | 11 +++++++---- uefi_firmware/compression/LZMA/LzmaDecompress.h | 11 +++++++---- uefi_firmware/compression/Tiano/Decompress.c | 12 ++++++------ uefi_firmware/compression/Tiano/Decompress.h | 8 ++++---- 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51c794a..f185810 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: build_sdist: name: Build sdist - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout source uses: actions/checkout@v3 @@ -64,7 +64,7 @@ jobs: publish_pypi: name: Publish artifacts to PyPI - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') needs: [build_sdist, build_wheels] permissions: diff --git a/uefi_firmware/compression/Include/CompressionTypes.h b/uefi_firmware/compression/Include/CompressionTypes.h index 3869395..253fb0d 100644 --- a/uefi_firmware/compression/Include/CompressionTypes.h +++ b/uefi_firmware/compression/Include/CompressionTypes.h @@ -39,7 +39,7 @@ EFI_STATUS typedef EFI_STATUS (*GETINFO_FUNCTION) ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, OUT size_t *DstSize, OUT size_t *ScratchSize @@ -48,7 +48,7 @@ EFI_STATUS typedef EFI_STATUS (*DECOMPRESS_FUNCTION) ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, IN OUT VOID *Destination, IN size_t DstSize, diff --git a/uefi_firmware/compression/LZMA/LzmaDecompress.c b/uefi_firmware/compression/LZMA/LzmaDecompress.c index 7e3a9ea..aded353 100644 --- a/uefi_firmware/compression/LZMA/LzmaDecompress.c +++ b/uefi_firmware/compression/LZMA/LzmaDecompress.c @@ -89,8 +89,8 @@ EFI_STATUS EFIAPI LzmaGetInfo ( CONST VOID *Source, - UINT32 SourceSize, - UINT32 *DestinationSize + size_t SourceSize, + size_t *DestinationSize ) { UINT64 DecodedSize; @@ -131,8 +131,11 @@ EFI_STATUS EFIAPI LzmaDecompress ( CONST VOID *Source, - UINT32 SourceSize, - VOID *Destination + size_t SourceSize, + VOID *Destination, + size_t _DstSize, + VOID *_Scratch, + size_t _ScratchSize ) { SRes LzmaResult; diff --git a/uefi_firmware/compression/LZMA/LzmaDecompress.h b/uefi_firmware/compression/LZMA/LzmaDecompress.h index 1ef79bd..99f6c66 100644 --- a/uefi_firmware/compression/LZMA/LzmaDecompress.h +++ b/uefi_firmware/compression/LZMA/LzmaDecompress.h @@ -55,8 +55,8 @@ extern "C" { EFIAPI LzmaGetInfo ( CONST VOID *Source, - UINT32 SourceSize, - UINT32 *DestinationSize + size_t SourceSize, + size_t *DestinationSize ); /* @@ -82,8 +82,11 @@ extern "C" { EFIAPI LzmaDecompress ( CONST VOID *Source, - UINT32 SourceSize, - VOID *Destination + size_t SourceSize, + VOID *Destination, + size_t _DstSize, + VOID *_Scratch, + size_t _ScratchSize ); #ifdef __cplusplus diff --git a/uefi_firmware/compression/Tiano/Decompress.c b/uefi_firmware/compression/Tiano/Decompress.c index 5a6a658..c3c7414 100644 --- a/uefi_firmware/compression/Tiano/Decompress.c +++ b/uefi_firmware/compression/Tiano/Decompress.c @@ -680,7 +680,7 @@ Returns: (VOID) EFI_STATUS GetInfo ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, OUT size_t *DstSize, OUT size_t *ScratchSize @@ -720,7 +720,7 @@ Routine Description: EFI_STATUS Decompress ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, IN OUT VOID *Destination, IN size_t DstSize, @@ -814,7 +814,7 @@ Routine Description: EFI_STATUS EfiGetInfo ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, OUT size_t *DstSize, OUT size_t *ScratchSize @@ -844,7 +844,7 @@ Routine Description: EFI_STATUS TianoGetInfo ( //-V524 - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, OUT size_t *DstSize, OUT size_t *ScratchSize @@ -874,7 +874,7 @@ Routine Description: EFI_STATUS EfiDecompress ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, IN OUT VOID *Destination, IN size_t DstSize, @@ -909,7 +909,7 @@ Routine Description: EFI_STATUS TianoDecompress ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, IN OUT VOID *Destination, IN size_t DstSize, diff --git a/uefi_firmware/compression/Tiano/Decompress.h b/uefi_firmware/compression/Tiano/Decompress.h index c7e9ef0..c0cef4f 100644 --- a/uefi_firmware/compression/Tiano/Decompress.h +++ b/uefi_firmware/compression/Tiano/Decompress.h @@ -26,7 +26,7 @@ Module Name: EFI_STATUS EfiGetInfo ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, OUT size_t *DstSize, OUT size_t *ScratchSize @@ -53,7 +53,7 @@ Routine Description: EFI_STATUS EfiDecompress ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, IN OUT VOID *Destination, IN size_t DstSize, @@ -84,7 +84,7 @@ Routine Description: EFI_STATUS TianoGetInfo ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, OUT size_t *DstSize, OUT size_t *ScratchSize @@ -111,7 +111,7 @@ Routine Description: EFI_STATUS TianoDecompress ( - IN VOID *Source, + IN CONST VOID *Source, IN size_t SrcSize, IN OUT VOID *Destination, IN size_t DstSize,