summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--ssh-vulnkey.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index e4a627a46..65a2b4265 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -48,6 +48,7 @@ openssh (1:4.7p1-11) UNRELEASED; urgency=low
48 - Fix error output if ssh-vulnkey fails to read key files, with the 48 - Fix error output if ssh-vulnkey fails to read key files, with the
49 exception of host keys unless -a was given. 49 exception of host keys unless -a was given.
50 - In verbose mode, output the name of each file examined. 50 - In verbose mode, output the name of each file examined.
51 * Handle leading IP addresses in ssh-vulnkey input (LP: #230497).
51 52
52 -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200 53 -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200
53 54
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++) {