diff options
author | 2008-07-25 07:05:16 +0000 | |
---|---|---|
committer | 2008-07-25 07:05:16 +0000 | |
commit | 182e296e03066f8295d7f7ee905beecb5685cfe6 (patch) | |
tree | 67454523abcfda874a70b8f51145dd8e42239c7f | |
parent | Add VisualHostKey to example file, ok djm@ (diff) | |
download | wireguard-openbsd-182e296e03066f8295d7f7ee905beecb5685cfe6.tar.xz wireguard-openbsd-182e296e03066f8295d7f7ee905beecb5685cfe6.zip |
In random art visualization, make sure to use the end marker only at the
end. Initial diff by Dirk Loss, tweaks and ok djm@
-rw-r--r-- | usr.bin/ssh/key.c | 5 |
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; } } |