diff options
Diffstat (limited to 'ssh-vulnkey.c')
-rw-r--r-- | ssh-vulnkey.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh-vulnkey.c b/ssh-vulnkey.c index 3ffc3fa0c..467bef091 100644 --- a/ssh-vulnkey.c +++ b/ssh-vulnkey.c | |||
@@ -163,6 +163,7 @@ do_filename(const char *filename, int quiet_open) | |||
163 | int i; | 163 | int i; |
164 | char *space; | 164 | char *space; |
165 | int type; | 165 | int type; |
166 | char *end; | ||
166 | 167 | ||
167 | /* Chop trailing newline. */ | 168 | /* Chop trailing newline. */ |
168 | i = strlen(line) - 1; | 169 | i = strlen(line) - 1; |
@@ -187,7 +188,8 @@ do_filename(const char *filename, int quiet_open) | |||
187 | /* Leading number (RSA1) or valid type (RSA/DSA) indicates | 188 | /* Leading number (RSA1) or valid type (RSA/DSA) indicates |
188 | * that we have no host name or options to skip. | 189 | * that we have no host name or options to skip. |
189 | */ | 190 | */ |
190 | if (atoi(cp) == 0 && type == KEY_UNSPEC) { | 191 | if ((strtol(cp, &end, 10) == 0 || *end != ' ') && |
192 | type == KEY_UNSPEC) { | ||
191 | int quoted = 0; | 193 | int quoted = 0; |
192 | 194 | ||
193 | for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) { | 195 | for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) { |