From: grunk Date: Fri, 25 Jul 2008 07:05:16 +0000 (+0000) Subject: In random art visualization, make sure to use the end marker only at the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=182e296e03066f8295d7f7ee905beecb5685cfe6;p=openbsd In random art visualization, make sure to use the end marker only at the end. Initial diff by Dirk Loss, tweaks and ok djm@ --- 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 , 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; } }