diff options
author | Mark Johnston <markj@FreeBSD.org> | 2019-02-19 21:22:22 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2019-02-19 21:22:22 +0000 |
commit | 60a92c781da2d6e1cc61fb5a9d759f15bb42c287 (patch) | |
tree | 2cf16e4b2ccd703cf3a0ede8cff4c74cd7187bde | |
parent | b1ece243880ba7f5342116dcc62c279ab02dbe57 (diff) |
Notes
-rw-r--r-- | sys/geom/geom_ctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index ae07cf696a55..0c0087912693 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -139,6 +139,12 @@ gctl_copyin(struct gctl_req *req) char *p; u_int i; + if (req->narg > 2048) { + gctl_error(req, "too many arguments"); + req->arg = NULL; + return; + } + ap = geom_alloc_copyin(req, req->arg, req->narg * sizeof(*ap)); if (ap == NULL) { gctl_error(req, "bad control request"); |