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:
parent
3377ea57f5
commit
fe210692fd
@ -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';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user