Revision: 16539 http://sourceforge.net/p/edk2/code/16539 Author: shenshushi Date: 2014-12-19 02:37:53 +0000 (Fri, 19 Dec 2014) Log Message: ----------- 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....@intel.com> Reviewed-by: Fu Siyuan <siyuan...@intel.com> Modified Paths: -------------- trunk/edk2/NetworkPkg/IScsiDxe/IScsiMisc.c Modified: trunk/edk2/NetworkPkg/IScsiDxe/IScsiMisc.c =================================================================== --- trunk/edk2/NetworkPkg/IScsiDxe/IScsiMisc.c 2014-12-19 02:08:59 UTC (rev 16538) +++ trunk/edk2/NetworkPkg/IScsiDxe/IScsiMisc.c 2014-12-19 02:37:53 UTC (rev 16539) @@ -226,6 +226,7 @@ // // Remove the last '-' // + ASSERT (StrLen(Str) >= 1); Str[StrLen (Str) - 1] = 0; for (Index = StrLen (Str) - 1; Index > 1; Index = Index - 2) { ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits