From d7bdc25960544d864adabe3812340ff4e39ad3ee Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 28 Sep 2013 14:01:23 +0000 Subject: [PATCH] Use memcpy() instead of strlcpy() in two places where the source length is known and the destination length is known to be sufficient. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@376 13b04d17-f746-0410-82c6-800466cd88b0 --- source/tcl_public.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/tcl_public.c b/source/tcl_public.c index 7f3aff4..b17b8fd 100644 --- a/source/tcl_public.c +++ b/source/tcl_public.c @@ -453,7 +453,7 @@ Tcl_GetKeyedListKeys (tcl_interp, subFieldName, keyedList, keysArgcPtr, NULL); TclFindElement (tcl_interp, fieldPtr, &keyPtr, &dummyPtr, &keySize, NULL); keyArgv [idx++] = nextByte; - strlcpy (nextByte, keyPtr, keySize); + memcpy (nextByte, keyPtr, keySize); nextByte [keySize] = '\0'; nextByte += keySize + 1; } @@ -578,7 +578,7 @@ int Tcl_GetKeyedListField (tcl_interp, fieldName, keyedList, fieldValuePtr) fieldValue = ckalloc (valueSize + 1); if (braced) { - strlcpy (fieldValue, valuePtr, valueSize); + memcpy (fieldValue, valuePtr, valueSize); fieldValue [valueSize] = 0; } else