summaryrefslogtreecommitdiffstats
path: root/lib/libskey/put.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-22 02:13:08 +0000
committerderaadt <deraadt@openbsd.org>2002-06-22 02:13:08 +0000
commit2cab24aa6be95edf147d8769d70362d1c9a9eea7 (patch)
treed8f945d61528b0590bc60854948278af068dba28 /lib/libskey/put.c
parentcorrect comment (diff)
downloadwireguard-openbsd-2cab24aa6be95edf147d8769d70362d1c9a9eea7.tar.xz
wireguard-openbsd-2cab24aa6be95edf147d8769d70362d1c9a9eea7.zip
use strtok_r() instead of strtok(); millert ok
Diffstat (limited to 'lib/libskey/put.c')
-rw-r--r--lib/libskey/put.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libskey/put.c b/lib/libskey/put.c
index 9b95a6be39c..0876138ad1b 100644
--- a/lib/libskey/put.c
+++ b/lib/libskey/put.c
@@ -8,7 +8,7 @@
*
* Dictionary lookup and extraction.
*
- * $OpenBSD: put.c,v 1.11 2002/02/16 21:27:27 millert Exp $
+ * $OpenBSD: put.c,v 1.12 2002/06/22 02:13:10 deraadt Exp $
*/
#include <stdio.h>
@@ -373,6 +373,7 @@ etob(out, e)
int i, p, v, l, low, high;
char b[SKEY_BINKEY_SIZE+1];
char input[36];
+ char *last;
if (e == NULL)
return(-1);
@@ -382,7 +383,7 @@ etob(out, e)
(void)memset(b, 0, sizeof(b));
(void)memset(out, 0, SKEY_BINKEY_SIZE);
for (i = 0, p = 0; i < 6; i++, p += 11) {
- if ((word = strtok(i == 0 ? input : NULL, " ")) == NULL)
+ if ((word = strtok_r(i == 0 ? input : NULL, " ", &last)) == NULL)
return(-1);
l = strlen(word);