Re: [edk2] [PATCH] MdePkg/SafeString: Directly return when length of source string is 0

2018-02-05 Thread Ni, Ruiyu
Re: [edk2] [PATCH] MdePkg/SafeString: Directly return when length of source string is 0 On 02/02/18 11:47, Ruiyu Ni wrote: Today's implementation of [Ascii]StrnCpyS/[Ascii]StrnCatS doesn't directly return the the length of source string is 0. When length of source string is 0, it means

Re: [edk2] [PATCH] MdePkg/SafeString: Directly return when length of source string is 0

2018-02-04 Thread Yao, Jiewen
Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Friday, February 2, 2018 9:43 PM > To: Ni, Ruiyu <ruiyu...@intel.com>; edk2-devel@lists.01.org > Cc: Yao, Jiewen <jiewen@intel.com>; Gao, Liming <liming....@intel.com> > Subject: Re: [edk2] [PATCH] MdePkg/SafeString: Dir

Re: [edk2] [PATCH] MdePkg/SafeString: Directly return when length of source string is 0

2018-02-04 Thread Wang, Jian J
Reviewed-by: Jian J Wang > -Original Message- > From: Ni, Ruiyu > Sent: Friday, February 02, 2018 6:48 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Gao, Liming ; > Wang, Jian J > Subject:

Re: [edk2] [PATCH] MdePkg/SafeString: Directly return when length of source string is 0

2018-02-02 Thread Laszlo Ersek
On 02/02/18 11:47, Ruiyu Ni wrote: > Today's implementation of [Ascii]StrnCpyS/[Ascii]StrnCatS doesn't > directly return the the length of source string is 0. > > When length of source string is 0, it means the Source points to > a memory that shouldn't be deferenced at all. > So it's not proper

[edk2] [PATCH] MdePkg/SafeString: Directly return when length of source string is 0

2018-02-02 Thread Ruiyu Ni
Today's implementation of [Ascii]StrnCpyS/[Ascii]StrnCatS doesn't directly return the the length of source string is 0. When length of source string is 0, it means the Source points to a memory that shouldn't be deferenced at all. So it's not proper to call StrnLenS() in such situation. In a pool