summaryrefslogtreecommitdiff
path: root/sshkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshkey.c')
-rw-r--r--sshkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sshkey.c b/sshkey.c
index c5185128a..b60f325f7 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshkey.c,v 1.25 2015/11/16 22:50:01 djm Exp $ */ 1/* $OpenBSD: sshkey.c,v 1.26 2015/11/16 23:47:52 millert Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Alexander von Gernler. All rights reserved. 4 * Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -1216,7 +1216,7 @@ read_decimal_bignum(char **cpp, BIGNUM *v)
1216 return SSH_ERR_BIGNUM_TOO_LARGE; 1216 return SSH_ERR_BIGNUM_TOO_LARGE;
1217 if (cp[e] == '\0') 1217 if (cp[e] == '\0')
1218 skip = 0; 1218 skip = 0;
1219 else if (index(" \t\r\n", cp[e]) == NULL) 1219 else if (strchr(" \t\r\n", cp[e]) == NULL)
1220 return SSH_ERR_INVALID_FORMAT; 1220 return SSH_ERR_INVALID_FORMAT;
1221 cp[e] = '\0'; 1221 cp[e] = '\0';
1222 if (BN_dec2bn(&v, cp) <= 0) 1222 if (BN_dec2bn(&v, cp) <= 0)
@@ -1246,7 +1246,7 @@ sshkey_read(struct sshkey *ret, char **cpp)
1246#ifdef WITH_SSH1 1246#ifdef WITH_SSH1
1247 /* Get number of bits. */ 1247 /* Get number of bits. */
1248 bits = strtoul(cp, &ep, 10); 1248 bits = strtoul(cp, &ep, 10);
1249 if (*cp == '\0' || index(" \t\r\n", *ep) == NULL || 1249 if (*cp == '\0' || strchr(" \t\r\n", *ep) == NULL ||
1250 bits == 0 || bits > SSHBUF_MAX_BIGNUM * 8) 1250 bits == 0 || bits > SSHBUF_MAX_BIGNUM * 8)
1251 return SSH_ERR_INVALID_FORMAT; /* Bad bit count... */ 1251 return SSH_ERR_INVALID_FORMAT; /* Bad bit count... */
1252 /* Get public exponent, public modulus. */ 1252 /* Get public exponent, public modulus. */