summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshkey.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-11-16 23:47:52 +0000
committermillert <millert@openbsd.org>2015-11-16 23:47:52 +0000
commit42a45d4abca6992d9b81e202a8999ced538ec096 (patch)
tree0048b3c4c722b05ab4702bb3229058a176a64ff8 /usr.bin/ssh/sshkey.c
parent0x7f is a valid key. (diff)
downloadwireguard-openbsd-42a45d4abca6992d9b81e202a8999ced538ec096.tar.xz
wireguard-openbsd-42a45d4abca6992d9b81e202a8999ced538ec096.zip
Replace remaining calls to index(3) with strchr(3). OK jca@ krw@
Diffstat (limited to 'usr.bin/ssh/sshkey.c')
-rw-r--r--usr.bin/ssh/sshkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c
index 3cb95642881..5dd7fe83c1f 100644
--- a/usr.bin/ssh/sshkey.c
+++ b/usr.bin/ssh/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.25 2015/11/16 22:50:01 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.26 2015/11/16 23:47:52 millert Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -1190,7 +1190,7 @@ read_decimal_bignum(char **cpp, BIGNUM *v)
return SSH_ERR_BIGNUM_TOO_LARGE;
if (cp[e] == '\0')
skip = 0;
- else if (index(" \t\r\n", cp[e]) == NULL)
+ else if (strchr(" \t\r\n", cp[e]) == NULL)
return SSH_ERR_INVALID_FORMAT;
cp[e] = '\0';
if (BN_dec2bn(&v, cp) <= 0)
@@ -1220,7 +1220,7 @@ sshkey_read(struct sshkey *ret, char **cpp)
#ifdef WITH_SSH1
/* Get number of bits. */
bits = strtoul(cp, &ep, 10);
- if (*cp == '\0' || index(" \t\r\n", *ep) == NULL ||
+ if (*cp == '\0' || strchr(" \t\r\n", *ep) == NULL ||
bits == 0 || bits > SSHBUF_MAX_BIGNUM * 8)
return SSH_ERR_INVALID_FORMAT; /* Bad bit count... */
/* Get public exponent, public modulus. */