Fix use after free bug.
Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 5afa57fb7b17aa51cfba1ffa94e900fc7a5f0e04)
This commit is contained in:
parent
267e6f3cc0
commit
beeb0fa7be
@ -879,9 +879,9 @@ static int do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
|
||||
if (astrlen < 0)
|
||||
return -1;
|
||||
rv = equal(astr, astrlen, (unsigned char *)b, blen, flags);
|
||||
OPENSSL_free(astr);
|
||||
if (rv > 0 && peername)
|
||||
*peername = BUF_strndup((char *)astr, astrlen);
|
||||
OPENSSL_free(astr);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user