diff --git a/NOTICE.txt b/NOTICE.txt index b2cec1ff..0ef92e60 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -2,7 +2,7 @@ DEC - Delphi Encryption Compendium Version 6.5 Copyright (c) 2018 - 2020 Norman Gallery (ng931884 [at] gmx [dot] de) -Copyright (c) 2016 - 2022 Markus Humm (markus [dot] humm [at] googlemail [dot] com) (main contact) +Copyright (c) 2016 - 2023 Markus Humm (markus [dot] humm [at] googlemail [dot] com) (main contact) Copyright (c) 2008 - 2019 Frederik A. Winkelsdorf (winkelsdorf [at] gmail [dot] com) Copyright (c) 1999 - 2008 Hagen Reddmann (HaReddmann [at] T-Online [dot] de) @@ -27,6 +27,7 @@ Gloegg pierangelodalben denovosoftware alexrayne +Stevie Parts of the work loosely based on the works of Wolfgang Erhardt, who is unfortunately dead already. diff --git a/Source/DECCipherModesGCM.pas b/Source/DECCipherModesGCM.pas index 4975c895..9abd207b 100644 --- a/Source/DECCipherModesGCM.pas +++ b/Source/DECCipherModesGCM.pas @@ -608,7 +608,8 @@ procedure TGCM.DecodeGCM(Source, Dest: TBytes; Size: Integer); a_tag := XOR_T128(CalcGaloisHash(DataToAuthenticate, Source, Size), FE_K_Y0); Setlength(FCalcAuthenticationTag, FCalcAuthenticationTagLength); - Move(a_tag[0], FCalcAuthenticationTag[0], FCalcAuthenticationTagLength); + if (FCalcAuthenticationTagLength > 0) then + Move(a_tag[0], FCalcAuthenticationTag[0], FCalcAuthenticationTagLength); // Check for correct authentication result is in Done of DECCipherModes // if not IsEqual(FExpectedAuthenticationTag, FCalcAuthenticationTag) then @@ -646,7 +647,8 @@ procedure TGCM.EncodeGCM(Source, Dest: TBytes; Size: Integer); AuthTag := XOR_T128(CalcGaloisHash(DataToAuthenticate, Dest, Size), FE_K_Y0); Setlength(FCalcAuthenticationTag, FCalcAuthenticationTagLength); - Move(AuthTag[0], FCalcAuthenticationTag[0], FCalcAuthenticationTagLength); + if (FCalcAuthenticationTagLength > 0) then + Move(AuthTag[0], FCalcAuthenticationTag[0], FCalcAuthenticationTagLength); end; function TGCM.EncodeT128(Value: T128): T128;