mirror of https://github.com/acidanthera/audk.git
Code refine. Check the original length of array to avoid buffer over flow.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16539 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6a497016c9
commit
3532030489
|
@ -226,6 +226,7 @@ IScsiLunToUnicodeStr (
|
|||
//
|
||||
// Remove the last '-'
|
||||
//
|
||||
ASSERT (StrLen(Str) >= 1);
|
||||
Str[StrLen (Str) - 1] = 0;
|
||||
|
||||
for (Index = StrLen (Str) - 1; Index > 1; Index = Index - 2) {
|
||||
|
|
Loading…
Reference in New Issue