summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-11-03 19:16:20 +1100
committerDamien Miller <djm@mindrot.org>2008-11-03 19:16:20 +1100
commitc6aadd994d0ed79f5606b7061d576d514fd71cd7 (patch)
tree1f93e35a62b89fd8edd984327d1008d0abfa1ba2 /key.c
parent9f6fb56ab83da2e795e4a8eb863992701fd83516 (diff)
downloadopenssh-git-c6aadd994d0ed79f5606b7061d576d514fd71cd7.tar.gz
- grunk@cvs.openbsd.org 2008/07/25 07:05:16
[key.c] 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 'key.c')
-rw-r--r--key.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/key.c b/key.c
index 2ea13d27..76d6af92 100644
--- a/key.c
+++ b/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
@@ -369,7 +369,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;
}
}