public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: wang xiaofeng <winggundum82@163.com>,
	"Gao, Liming" <liming.gao@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: SetUnicodeMem in DisplayEngineDxe seems unsafe
Date: Wed, 25 Jan 2017 02:29:52 +0000	[thread overview]
Message-ID: <ED077930C258884BBCB450DB737E66224A8EF293@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <5824bac0.f0d.159d36ddb6c.Coremail.winggundum82@163.com>

Xiaofeng,

BugZillar link is: https://bugzilla.tianocore.org/

Thanks,
Eric
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of wang xiaofeng
> Sent: Wednesday, January 25, 2017 10:22 AM
> To: Gao, Liming
> Cc: edk2-devel@lists.01.org; Dong, Eric
> Subject: Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
> 
> Hi Liming,
>     Where is the BugZillar link? I will try if I can submit it. But not sure where I can quickly apply for an account.
> 
> 
> 
> 
> 
> 
> 
> 
> At 2017-01-25 08:54:47, "Gao, Liming" <liming.gao@intel.com> wrote:
> >Xiaofeng:
> >   Yes. This is a potential issue. This API should be updated with original Buffer Size. Could you help submit this issue in BugZillar?
> >
> >Thanks
> >Liming
> >>-----Original Message-----
> >>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> >>wang xiaofeng
> >>Sent: Tuesday, January 24, 2017 3:56 PM
> >>To: edk2-devel@lists.01.org; Dong, Eric <eric.dong@intel.com>
> >>Subject: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe
> >>
> >>Hi DisplayEngineDxe  Owner,
> >>   SetUnicodeMem seems unsafe  since the buffer may overflow if the input
> >>Size is bigger than buffer size.Do we think about improve the function
> >>
> >>
> >>/**
> >>  Set Buffer to Value for Size bytes.
> >>
> >>
> >>  @param  Buffer                 Memory to set.
> >>  @param  Size                   Number of bytes to set
> >>  @param  Value                  Value of the set operation.
> >>
> >>
> >>**/
> >>VOID
> >>SetUnicodeMem (
> >>  IN VOID   *Buffer,
> >>  IN UINTN  Size,
> >>  IN CHAR16 Value
> >>  )
> >>{
> >>  CHAR16  *Ptr;
> >>
> >>
> >>  Ptr = Buffer;
> >>  while ((Size--)  != 0) {
> >>    *(Ptr++) = Value;
> >>  }
> >>}
> >>
> >>   The problem I meet is liking the following screen. Year in main page shows
> >>incorrect char randomly.
> >>
> >>   If I turn off GetNumericInput optimize with #pragma optimize( "", off ) in
> >>InputHandler.c , or swtich to use StrCpyS like this. The problem disappear. This
> >>issue cannot be seen in OVMF ,but it can be reproduced in our own platform
> >>with a rate of 30%.
> >>
> >>
> >>
> >>_______________________________________________
> >>edk2-devel mailing list
> >>edk2-devel@lists.01.org
> >>https://lists.01.org/mailman/listinfo/edk2-devel
> >_______________________________________________
> >edk2-devel mailing list
> >edk2-devel@lists.01.org
> >https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2017-01-25  2:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04  7:13 unable to build update capsule image Iddamsetty, Aravind (Artesyn)
2017-01-04  8:00 ` Yao, Jiewen
2017-01-04  8:14 ` Yao, Jiewen
2017-01-04  8:51   ` Iddamsetty, Aravind (Artesyn)
2017-01-12  3:02   ` how to update capsule image with CapsuleApp wang xiaofeng
2017-01-12  3:26     ` Yao, Jiewen
2017-01-13  5:33       ` seems a minor logic error in UpdateCapsule of MdeModulePkg\Universal\CapsuleRuntimeDxe wang xiaofeng
2017-01-24  7:56         ` SetUnicodeMem in DisplayEngineDxe seems unsafe wang xiaofeng
2017-01-25  0:54           ` Gao, Liming
2017-01-25  2:21             ` wang xiaofeng
2017-01-25  2:29               ` Dong, Eric [this message]
2017-01-25  2:48                 ` wang xiaofeng
2017-01-25  2:29               ` Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED077930C258884BBCB450DB737E66224A8EF293@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox