Mike,

Thanks for catching it. The patch has sent out.

Regards,
Jian


> -----Original Message-----
> From: Kinney, Michael D
> Sent: Friday, December 29, 2017 9:08 AM
> To: Wang, Jian J <[email protected]>; [email protected]; Kinney,
> Michael D <[email protected]>
> Subject: RE: [edk2] [PATCH v2 0/2] Fix error in PrintLib
> 
> Jian,
> 
> This change breaks GCC5 builds.
> 
> /home/mdkinney/tianocore/edk2/MdeModulePkg/Library/DxePrintLibPrint2Pro
> tocol/PrintLib.c: In function 'InternalPrintLibSPrintMarker':
> /home/mdkinney/tianocore/edk2/MdeModulePkg/Library/DxePrintLibPrint2Pro
> tocol/PrintLib.c:2054:71: error: suggest parentheses around '&&' within '||' 
> [-
> Werror=parentheses]
>              ArgumentString[Count * BytesPerArgumentCharacter] != '\0' &&
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
>              Count < Precision || ((Flags & PRECISION) == 0);
>              ~~~~~~~~~~~~~~~~~
> 
> Mike
> 
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-
> > [email protected]] On Behalf Of Jian J Wang
> > Sent: Wednesday, December 27, 2017 6:38 PM
> > To: [email protected]
> > Subject: [edk2] [PATCH v2 0/2] Fix error in PrintLib
> >
> > > v2:
> > >    a. Correct incorrect description in commit log
> > >    b. Fix another similar issue in the same function
> > >    c. Fix similar issues in
> > MdeModulePkg/DxePrintLibPrint2Protocol
> >
> > Due to a potential hole in the stop condition of the
> > loop, the two continuous
> > access to ArgumentString (index, index+1) inside the
> > loop might cause the
> > string ending character ('\0') and the byte after it to
> > be read.
> >
> > Jian J Wang (2):
> >   MdePkg/BasePrintLib: Fix error in Precision position
> > calculation
> >   MdeModulePkg/DxePrintLibPrint2Protocol: Fix potential
> > string over read
> >
> >
> > MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib
> > .c | 7 +++++--
> >  MdePkg/Library/BasePrintLib/PrintLibInternal.c
> > | 7 +++++--
> >  2 files changed, 10 insertions(+), 4 deletions(-)
> >
> > --
> > 2.15.1.windows.2
> >
> > _______________________________________________
> > edk2-devel mailing list
> > [email protected]
> > https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to