mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
ecdsa_newkey: fix a crash where the second curve name is missing or corrupt.
Bug found with the help of afl-fuzz.
This commit is contained in:
parent
e3fe709a8f
commit
f69b371bcd
1
sshecc.c
1
sshecc.c
@ -1770,6 +1770,7 @@ static void *ecdsa_newkey(const struct ssh_signkey *self,
|
||||
/* Curve name is duplicated for Weierstrass form */
|
||||
if (curve->type == EC_WEIERSTRASS) {
|
||||
getstring(&data, &len, &p, &slen);
|
||||
if (!p) return NULL;
|
||||
if (!match_ssh_id(slen, p, curve->name)) return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user