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

2018-02-05 Thread Ni, Ruiyu
. Thank you Yao Jiewen -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Friday, February 2, 2018 9:43 PM To: Ni, Ruiyu ; edk2-devel@lists.01.org Cc: Yao, Jiewen ; Gao, Liming Subject: Re: [edk2] [PATCH] MdePkg/SafeString: Directly return when length of source string

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 ; edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Gao, Liming > Subject: Re: [edk2] [PATCH] MdePkg/SafeString: Directly return when length of > source string is 0 > > On 02/02/18 11:47,

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: [PATCH] MdePkg/SafeString: Directly return when length of source > string is 0 > > Today's

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 t