summaryrefslogtreecommitdiff
path: root/lib/libskey/put.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-22 02:13:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-22 02:13:13 +0000
commit9f7b59f55f319eea3788abbfa16d1e0978d3bc83 (patch)
tree76298c316b8c07f93ac91f61d76c97a2ee7ed173 /lib/libskey/put.c
parentd0f2d6c8498a90a3bd21211bbd5a32a66498fa6c (diff)
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);