diff options
author | Colin Watson <cjwatson@debian.org> | 2008-05-26 09:39:18 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2008-05-26 09:39:18 +0000 |
commit | 086170cb0ab5c16d8bc17aff3f7abb7556794757 (patch) | |
tree | 0a41f5448096b46c0ae9cf684f2f6888d818e0e0 | |
parent | 9c33daab1ef2cdfc5b1a100e0a2b2a27005397af (diff) |
Fix some buffer handling inconsistencies in ssh-vulnkey (thanks, Solar
Designer).
-rw-r--r-- | authfile.c | 5 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/authfile.c b/authfile.c index 9ab90e3c8..cffea2a6c 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -719,13 +719,13 @@ blacklisted_key_in_file(const Key *key, const char *blacklist_file) | |||
719 | ssize_t r; | 719 | ssize_t r; |
720 | char *newline; | 720 | char *newline; |
721 | 721 | ||
722 | r = atomicio(read, fd, buf, 256); | 722 | r = atomicio(read, fd, buf, sizeof(buf)); |
723 | if (r <= 0) | 723 | if (r <= 0) |
724 | goto out; | 724 | goto out; |
725 | if (buf[0] != '#') | 725 | if (buf[0] != '#') |
726 | break; | 726 | break; |
727 | 727 | ||
728 | newline = memchr(buf, '\n', 256); | 728 | newline = memchr(buf, '\n', sizeof(buf)); |
729 | if (!newline) | 729 | if (!newline) |
730 | goto out; | 730 | goto out; |
731 | start += newline + 1 - buf; | 731 | start += newline + 1 - buf; |
@@ -741,7 +741,6 @@ blacklisted_key_in_file(const Key *key, const char *blacklist_file) | |||
741 | 741 | ||
742 | while (lower != upper) { | 742 | while (lower != upper) { |
743 | off_t cur; | 743 | off_t cur; |
744 | char buf[32]; | ||
745 | int cmp; | 744 | int cmp; |
746 | 745 | ||
747 | cur = lower + (upper - lower) / 2; | 746 | cur = lower + (upper - lower) / 2; |
diff --git a/debian/changelog b/debian/changelog index 702d53154..6dafdad96 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -50,6 +50,8 @@ openssh (1:4.7p1-11) UNRELEASED; urgency=low | |||
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 | * Handle leading IP addresses in ssh-vulnkey input (LP: #230497). |
52 | * Allow building with heimdal-dev (LP: #125805). | 52 | * Allow building with heimdal-dev (LP: #125805). |
53 | * Fix some buffer handling inconsistencies in ssh-vulnkey (thanks, Solar | ||
54 | Designer). | ||
53 | 55 | ||
54 | -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200 | 56 | -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200 |
55 | 57 | ||