=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/key.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- src/usr.bin/ssh/Attic/key.c 2008/06/11 23:02:22 1.71 +++ src/usr.bin/ssh/Attic/key.c 2008/06/11 23:51:57 1.72 @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.71 2008/06/11 23:02:22 otto Exp $ */ +/* $OpenBSD: key.c,v 1.72 2008/06/11 23:51:57 grunk Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -315,8 +315,8 @@ * Graphs are not unambiguous, because circles in graphs can be * walked in either direction. */ -#define FLDSIZE_Y 8 -#define FLDSIZE_X FLDSIZE_Y * 2 +#define FLDSIZE_Y 8 +#define FLDSIZE_X (FLDSIZE_Y * 2) static char * key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len) { @@ -329,7 +329,7 @@ u_char field[FLDSIZE_X][FLDSIZE_Y]; u_int i, b; int x, y; - size_t len = strlen(augmentation_string); + size_t len = strlen(augmentation_string) - 1; retval = xcalloc(1, (FLDSIZE_X + 3) * (FLDSIZE_Y + 2)); @@ -375,7 +375,7 @@ for (y = 0; y < FLDSIZE_Y; y++) { *p++ = '|'; for (x = 0; x < FLDSIZE_X; x++) - *p++ = augmentation_string[MIN(field[x][y], len - 1)]; + *p++ = augmentation_string[MIN(field[x][y], len)]; *p++ = '|'; *p++ = '\n'; }