Preserve limitation of "TCP_CA_NAME_MAX" when matching the algorithm
name. MFC after: 3 days Suggested by: gnn @
This commit is contained in:
parent
f42d8dec6c
commit
614b50ae8b
@ -107,7 +107,8 @@ cc_default_algo(SYSCTL_HANDLER_ARGS)
|
||||
CC_LIST_RLOCK();
|
||||
STAILQ_FOREACH(funcs, &cc_list, entries) {
|
||||
/* NOTE: "newptr" is not zero terminated */
|
||||
if (req->newlen != strlen(funcs->name))
|
||||
if (req->newlen != strnlen(funcs->name,
|
||||
TCP_CA_NAME_MAX - 1))
|
||||
continue;
|
||||
if (bcmp(req->newptr, funcs->name, req->newlen))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user