On Tue, Sep 29, 2015 at 10:28:59AM +0200, Ard Biesheuvel wrote:
> The handling of ARM MOVW/MOVT relocations sets the FixupData twice (once
> incorrectly), but fails to advance the *FixupData pointer afterwards.
> This is not actually a problem, since the fixup data is never used but
> let's fix it anyway in case anyone reuses this code.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
> ---
>  BaseTools/Source/C/Common/PeCoffLoaderEx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/C/Common/PeCoffLoaderEx.c 
> b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
> index 382138a8937e..d04fa7d5ba2d 100644
> --- a/BaseTools/Source/C/Common/PeCoffLoaderEx.c
> +++ b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
> @@ -402,8 +402,8 @@ PeCoffLoaderRelocateArmImage (
>      
>      if (*FixupData != NULL) {
>        *FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64));
> -      *(UINT64 *)(*FixupData) = *Fixup16;
>        CopyMem (*FixupData, Fixup16, sizeof (UINT64));
> +      *FixupData = *FixupData + sizeof(UINT64);
>      }
>      break;
>    
> -- 
> 1.9.1

Well spotted.

Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to