mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Extra crash-safety in decoding a DSS signature blob
[originally from svn r968]
This commit is contained in:
parent
b182356f99
commit
902d0636fc
2
sshdss.c
2
sshdss.c
@ -204,7 +204,7 @@ static int dss_verifysig(void *key, char *sig, int siglen,
|
||||
*/
|
||||
if (siglen != 40) { /* bug not present; read admin fields */
|
||||
getstring(&sig, &siglen, &p, &slen);
|
||||
if (!p || memcmp(p, "ssh-dss", 7)) {
|
||||
if (!p || slen != 7 || memcmp(p, "ssh-dss", 7)) {
|
||||
return 0;
|
||||
}
|
||||
sig += 4, siglen -= 4; /* skip yet another length field */
|
||||
|
Loading…
Reference in New Issue
Block a user