]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c
Refine code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiMisc.c
index a00d805b84c4758363103dc4acc68750d9583a5b..1cb1fb89d9ec97c44160a8f6f28ddb3f189537be 100644 (file)
@@ -219,6 +219,7 @@ IScsiLunToUnicodeStr (
     TempStr += StrLen (TempStr);\r
   }\r
 \r
+  ASSERT (StrLen(Str) >= 1);\r
   Str[StrLen (Str) - 1] = 0;\r
 \r
   for (Index = StrLen (Str) - 1; Index > 1; Index = Index - 2) {\r