Jeff,
I confirm there are two similar places. Your patch is good.

Sergey

On 17 июля 2014 г., at 14:07, Fan, Jeff <[email protected]> wrote:

> Sergey,
>  
> Your fix is good.  I attached the patch with adding another place about the 
> same issue.
> Please help to confirm it.
>  
> Reviewed-by: Jeff Fan <[email protected]>
>  
> Thanks!
> Jeff
>  
> From: Sergey Isakov [mailto:[email protected]] 
> Sent: Wednesday, July 16, 2014 2:50 AM
> To: [email protected]
> Subject: [edk2] [BUG] Wrong usage sizeof(SIZE)
>  
> Dear sirs,
>  
> File edk2/OptionRomPkg/CirrusLogic5430Dxe/Edid.c line:143
> ———
>   *EdidDataBlock = AllocateCopyPool (
>                      sizeof (EDID_BLOCK_SIZE),
>                      ValidEdid
>                      );
>  
> ——
> There must be EDID_BLOCK_SIZE not sizeof().
>  
> Summary: Suspicious usage of 'sizeof' with a numeric constant as parameter.
> Message: It is unusual to use a constant value with sizeof. For example, 
> 'sizeof(10)' returns 4 (in 32-bit systems) or 8 (in 64-bit systems) instead 
> of 10. 'sizeof('A')' and 'sizeof(char)' can return different results.
>  
> Sergey
> <Edid.c.patch>------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to