[Pcsclite-cvs-commit] r7068 - trunk/PCSC/src
ludovic.rousseau at free.fr
ludovic.rousseau at free.fr
Wed Dec 31 17:55:10 UTC 2014
Author: rousseau
Date: 2014-12-31 17:55:09 +0000 (Wed, 31 Dec 2014)
New Revision: 7068
Modified:
trunk/PCSC/src/tokenparser.l
Log:
Do not use strlcpy(3)
Remove the dependency.
Modified: trunk/PCSC/src/tokenparser.l
===================================================================
--- trunk/PCSC/src/tokenparser.l 2014-12-31 17:50:26 UTC (rev 7067)
+++ trunk/PCSC/src/tokenparser.l 2014-12-31 17:55:09 UTC (rev 7068)
@@ -52,7 +52,6 @@
#include "simclist.h"
#include "debuglog.h"
#include "parser.h"
-#include "strlcpycat.h"
static void eval_key(char *pcToken, list_t *list_key);
static void eval_value(char *pcToken, list_t *list_values);
@@ -97,7 +96,8 @@
len++; /* final NULL byte */
elt->key = malloc(len);
- (void)strlcpy(elt->key, &pcToken[5], len);
+ memcpy(elt->key, &pcToken[5], len-1);
+ elt->key[len-1] = '\0';
r = list_init(&elt->values);
assert(r >= 0);
@@ -128,7 +128,8 @@
value = malloc(len);
assert(value);
- (void)strlcpy(value, &pcToken[8], len);
+ memcpy(value, &pcToken[8], len-1);
+ value[len-1] = '\0';
/* for all & in the string */
amp = value;
More information about the Pcsclite-cvs-commit
mailing list