NetworkPkg:Replace unsafe string functions.

Replace unsafe string functions with new added safe string functions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17887 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Zhang Lubo
2015-07-08 12:17:11 +00:00
committed by luobozhang
parent e0f74cea66
commit c960bdc2dc
12 changed files with 59 additions and 52 deletions

View File

@@ -1,7 +1,7 @@
/** @file
Support functions implementation for UefiPxeBc Driver.
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1392,6 +1392,7 @@ PxeBcUintnToAscDecWithFormat (
@param[in] Number Numeric value to be converted.
@param[in] Buffer The pointer to the buffer for ASCII string.
@param[in] BufferSize The maxsize of the buffer.
@return Length The actual length of the ASCII string.
@@ -1399,7 +1400,8 @@ PxeBcUintnToAscDecWithFormat (
UINTN
PxeBcUintnToAscDec (
IN UINTN Number,
IN UINT8 *Buffer
IN UINT8 *Buffer,
IN UINTN BufferSize
)
{
UINTN Index;
@@ -1415,7 +1417,7 @@ PxeBcUintnToAscDec (
Number = (UINTN) (Number / 10);
} while (Number != 0);
AsciiStrCpy ((CHAR8 *) Buffer, &TempStr[Index]);
AsciiStrCpyS ((CHAR8 *) Buffer, BufferSize, &TempStr[Index]);
Length = AsciiStrLen ((CHAR8 *) Buffer);