]> andersk Git - openssh.git/blobdiff - key.c
- otto@cvs.openbsd.org 2008/06/25 11:13:43
[openssh.git] / key.c
diff --git a/key.c b/key.c
index f981710a72d6ce0719069574cab625a72914b452..515103cb4d1839a0da4ea83c4ee42c149c7906f0 100644 (file)
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.76 2008/06/12 22:03:36 grunk Exp $ */
+/* $OpenBSD: key.c,v 1.77 2008/06/25 11:13:43 otto Exp $ */
 /*
  * read_bignum():
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -378,11 +378,11 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len, const Key *k)
        field[x][y] = len;
 
        /* fill in retval */
-       snprintf(retval, 10, "+--[%4s]", key_type(k));
+       snprintf(retval, FLDSIZE_X, "+--[%4s %4u]", key_type(k), key_size(k));
        p = strchr(retval, '\0');
 
        /* output upper border */
-       for (i = 0; i < FLDSIZE_X - 8; i++)
+       for (i = p - retval - 1; i < FLDSIZE_X; i++)
                *p++ = '-';
        *p++ = '+';
        *p++ = '\n';
This page took 0.198114 seconds and 4 git commands to generate.