Fix memory leak on bad inputs.
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
Changes between 0.9.8r and 0.9.8s [xx XXX xxxx]
|
Changes between 0.9.8r and 0.9.8s [xx XXX xxxx]
|
||||||
|
|
||||||
|
*) Fix x509_name_ex_d2i memory leak on bad inputs.
|
||||||
|
[Bodo Moeller]
|
||||||
|
|
||||||
*) Add protection against ECDSA timing attacks as mentioned in the paper
|
*) Add protection against ECDSA timing attacks as mentioned in the paper
|
||||||
by Billy Bob Brumley and Nicola Tuveri, see:
|
by Billy Bob Brumley and Nicola Tuveri, see:
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,9 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len
|
|||||||
*val = nm.a;
|
*val = nm.a;
|
||||||
*in = p;
|
*in = p;
|
||||||
return ret;
|
return ret;
|
||||||
err:
|
err:
|
||||||
|
if (nm.x != NULL)
|
||||||
|
X509_NAME_free(nm.x);
|
||||||
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
|
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user