#include <Library/MemoryAllocationLib.h>\r
#include <Library/DebugLib.h>\r
\r
+#define MAX_STRING_SIZE 0x1000\r
+\r
//\r
// File operations are not required for building Open SSL, \r
// so FILE is mapped to VOID * to pass build\r
#define memmove(dest,source,count) CopyMem(dest,source,(UINTN)(count))\r
#define strcmp AsciiStrCmp\r
#define strncmp(string1,string2,count) (int)(AsciiStrnCmp(string1,string2,(UINTN)(count)))\r
-#define strcpy(strDest,strSource) AsciiStrCpy(strDest,strSource)\r
-#define strncpy(strDest,strSource,count) AsciiStrnCpy(strDest,strSource,(UINTN)count)\r
-#define strlen(str) (size_t)(AsciiStrLen(str))\r
-#define strcat(strDest,strSource) AsciiStrCat(strDest,strSource)\r
+#define strcpy(strDest,strSource) AsciiStrCpyS(strDest,MAX_STRING_SIZE,strSource)\r
+#define strncpy(strDest,strSource,count) AsciiStrnCpyS(strDest,MAX_STRING_SIZE,strSource,(UINTN)count)\r
+#define strlen(str) (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE))\r
+#define strcat(strDest,strSource) AsciiStrCatS(strDest,MAX_STRING_SIZE,strSource)\r
#define strchr(str,ch) ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch)\r
#define abort() ASSERT (FALSE)\r
#define assert(expression)\r