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
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
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:
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
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
5 matches
Mail list logo