summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorAlexander von Gernler <grunk@cvs.openbsd.org>2008-07-25 07:05:17 +0000
committerAlexander von Gernler <grunk@cvs.openbsd.org>2008-07-25 07:05:17 +0000
commitae2afe8806d268c37f4053755402a87d0b0f279b (patch)
treee1b301fe598a518b6d00997cce3d3fe6ddfcb17f /usr.bin/ssh
parent4c83d92eb827be1b2eaf146a28a354dca8e24bf1 (diff)
In random art visualization, make sure to use the end marker only at the
end. Initial diff by Dirk Loss, tweaks and ok djm@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/key.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c
index 5b0a584db03..31d5ce889c9 100644
--- a/usr.bin/ssh/key.c
+++ b/usr.bin/ssh/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.78 2008/07/07 23:32:51 stevesk Exp $ */
+/* $OpenBSD: key.c,v 1.79 2008/07/25 07:05:16 grunk Exp $ */
/*
* read_bignum():
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -365,7 +365,8 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len, const Key *k)
y = MIN(y, FLDSIZE_Y - 1);
/* augment the field */
- field[x][y]++;
+ if (field[x][y] < len - 2)
+ field[x][y]++;
input = input >> 2;
}
}