Plug memory leak in ctl(4) when ctl_copyin_args() is called with a non-
null terminated ASCII string. PR: 207626 Submitted by: cturt@hardenedbsd.org MFC after: 2 days
This commit is contained in:
parent
36e4410ab0
commit
bbea316cc8
@ -2445,6 +2445,7 @@ ctl_copyin_args(int num_args, struct ctl_be_arg *uargs,
|
||||
&& (tmpptr[args[i].vallen - 1] != '\0')) {
|
||||
snprintf(error_str, error_str_len, "Argument "
|
||||
"%d value is not NUL-terminated", i);
|
||||
free(tmpptr, M_CTL);
|
||||
goto bailout;
|
||||
}
|
||||
args[i].kvalue = tmpptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user