mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-23 08:21:09 +01:00
Define a constant for the maximum number of GEOM_CTL arguments.
Reviewed by: eugen MFC with: r344305 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19271
This commit is contained in:
parent
885b0f9e91
commit
cd2e908669
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344365
@ -139,7 +139,7 @@ gctl_copyin(struct gctl_req *req)
|
||||
char *p;
|
||||
u_int i;
|
||||
|
||||
if (req->narg > 2048) {
|
||||
if (req->narg > GEOM_CTL_ARG_MAX) {
|
||||
gctl_error(req, "too many arguments");
|
||||
req->arg = NULL;
|
||||
return;
|
||||
|
@ -78,7 +78,8 @@ struct gctl_req {
|
||||
|
||||
#define GEOM_CTL _IOW('G', GCTL_VERSION, struct gctl_req)
|
||||
|
||||
#define GEOM_CTL_ARG_MAX 2048 /* maximum number of parameters */
|
||||
|
||||
#define PATH_GEOM_CTL "geom.ctl"
|
||||
|
||||
|
||||
#endif /* _GEOM_GEOM_CTL_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user