1
0
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:
Ben Harris 2015-10-10 00:11:15 +01:00
parent e3fe709a8f
commit f69b371bcd

View File

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