Revision: 16538 http://sourceforge.net/p/edk2/code/16538 Author: shenshushi Date: 2014-12-19 02:08:59 +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: -------------- branches/UDK2014.SP1/NetworkPkg/IScsiDxe/IScsiMisc.c Modified: branches/UDK2014.SP1/NetworkPkg/IScsiDxe/IScsiMisc.c =================================================================== --- branches/UDK2014.SP1/NetworkPkg/IScsiDxe/IScsiMisc.c 2014-12-18 07:16:05 UTC (rev 16537) +++ branches/UDK2014.SP1/NetworkPkg/IScsiDxe/IScsiMisc.c 2014-12-19 02:08:59 UTC (rev 16538) @@ -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