Fix tls1_get_curvelist default curves list size.
The length is the number of elements now, not the size in bytes. Caught by ASan. Change-Id: I4c5ccee61711e8d2e272b9bacd292dbff04b5133 Reviewed-on: https://boringssl-review.googlesource.com/1336 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
0aa0767340
commit
0eb5a2df4a
@ -480,7 +480,7 @@ static void tls1_get_curvelist(SSL *s, int get_client_curves,
|
||||
{
|
||||
case SSL_CERT_FLAG_SUITEB_128_LOS:
|
||||
*out_curve_ids = suiteb_curves;
|
||||
*out_curve_ids_len = sizeof(suiteb_curves);
|
||||
*out_curve_ids_len = sizeof(suiteb_curves) / sizeof(suiteb_curves[0]);
|
||||
break;
|
||||
|
||||
case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
|
||||
@ -499,7 +499,7 @@ static void tls1_get_curvelist(SSL *s, int get_client_curves,
|
||||
if (!*out_curve_ids)
|
||||
{
|
||||
*out_curve_ids = eccurves_default;
|
||||
*out_curve_ids_len = sizeof(eccurves_default);
|
||||
*out_curve_ids_len = sizeof(eccurves_default) / sizeof(eccurves_default[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user