Re: [edk2-devel] [PATCH v2] NetworkPkg/IScsiDxe: Fix the index of array TargetUrlp[]

2019-10-14 Thread Zhang, Shenglei
Hi Philippe, > -Original Message- > From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com] > Sent: Monday, October 14, 2019 5:35 PM > To: devel@edk2.groups.io; Zhang, Shenglei > Cc: Fu, Siyuan ; Wu, Jiaxin ; > Laszlo Ersek > Subject: Re: [edk2-devel] [PATCH v2] Net

Re: [edk2-devel] [PATCH v2] NetworkPkg/IScsiDxe: Fix the index of array TargetUrlp[]

2019-10-14 Thread Philippe Mathieu-Daudé
Hi Zhang, On 10/14/19 5:14 AM, Zhang, Shenglei wrote: After the expression, 'CopyMem (&ConfigNvData->TargetUrl, Field->Str, Field->Len);', the '\0' should be set to TargetUrl[Field->Len] rather than TargetUrl[Field->Len + 1]. ^ This is one change, ... Besides the boundary check should be mor

[edk2-devel] [PATCH v2] NetworkPkg/IScsiDxe: Fix the index of array TargetUrlp[]

2019-10-13 Thread Zhang, Shenglei
After the expression, 'CopyMem (&ConfigNvData->TargetUrl, Field->Str, Field->Len);', the '\0' should be set to TargetUrl[Field->Len] rather than TargetUrl[Field->Len + 1]. Besides the boundary check should be more strict. Field->Len should range from 0-254 rather than 0-255. Cc: Siyuan Fu Cc: Jia