From: Tim Kosse Date: Tue, 11 Aug 2015 11:45:26 +0000 (+0200) Subject: Detect end of string in fingerprint alignment. X-Git-Tag: 0.68~476 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=fe210692fd0699e91d0194b44dc5faf278d90093;p=PuTTY.git Detect end of string in fingerprint alignment. This prevents writing past the end of the buffer should ssh2_fingerprint ever return a fingerprint not containing a colon. --- diff --git a/windows/winpgnt.c b/windows/winpgnt.c index 58b5af70..e9d91e3d 100644 --- a/windows/winpgnt.c +++ b/windows/winpgnt.c @@ -304,7 +304,7 @@ void keylist_update(void) pos = 0; while (1) { pos += strcspn(listentry + pos, " :"); - if (listentry[pos] == ':') + if (listentry[pos] == ':' || !listentry[pos]) break; listentry[pos++] = '\t'; }