1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 07:38:06 -05:00

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.
This commit is contained in:
Tim Kosse 2015-08-11 13:45:26 +02:00 committed by Simon Tatham
parent 3377ea57f5
commit fe210692fd

View File

@ -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';
}