On Fri, Feb 26, 2016 at 05:34:50PM +0800, Haojian Zhuang wrote:
> Since there's percentage calcution, multiply on 32bit variable
> will cause overflow. So fix the variables as 64bit.

So, this is not technically what it does - it changes the variables to
be native integer size, meaning this does not fix anything on AArch32.

Given that the existing code already populates one of these by calling
AsciiStrHexToUint64, it would seem the correct fix would be to follow
the commit message and actually change them to UINT64.

Regards,

Leif

> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhangfei Gao <[email protected]>
> Signed-off-by: Haojian Zhuang <[email protected]>
> ---
>  EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c 
> b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
> index f380817..91de365 100644
> --- a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
> +++ b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
> @@ -45,9 +45,9 @@ typedef enum {
>  STATIC ANDROID_FASTBOOT_STATE mState = ExpectCmdState;
>  
>  // When in ExpectDataState, the number of bytes of data to expect:
> -STATIC UINT32 mNumDataBytes;
> +STATIC UINTN mNumDataBytes;
>  // .. and the number of bytes so far received this data phase
> -STATIC UINT32 mBytesReceivedSoFar;
> +STATIC UINTN mBytesReceivedSoFar;
>  // .. and the buffer to save data into
>  STATIC UINT8 *mDataBuffer = NULL;
>  
> -- 
> 1.9.1
> 
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to