Use correct size type in do_setopt_accept_filter

Submitted by:	ecturt@gmail.com
This commit is contained in:
Ed Maste 2016-10-12 00:56:49 +00:00
parent 808b18e4d6
commit 2a059700b6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307076

View File

@ -250,7 +250,7 @@ do_setopt_accept_filter(struct socket *so, struct sockopt *sopt)
newaf = malloc(sizeof(*newaf), M_ACCF, M_WAITOK |
M_ZERO);
if (afp->accf_create != NULL && afap->af_name[0] != '\0') {
int len = strlen(afap->af_name) + 1;
size_t len = strlen(afap->af_name) + 1;
newaf->so_accept_filter_str = malloc(len, M_ACCF,
M_WAITOK);
strcpy(newaf->so_accept_filter_str, afap->af_name);