mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-18 03:28:07 -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;
|
pos = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
pos += strcspn(listentry + pos, " :");
|
pos += strcspn(listentry + pos, " :");
|
||||||
if (listentry[pos] == ':')
|
if (listentry[pos] == ':' || !listentry[pos])
|
||||||
break;
|
break;
|
||||||
listentry[pos++] = '\t';
|
listentry[pos++] = '\t';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user