genetlink: trigger BUG_ON if a group name is too long
Trigger BUG_ON if a group name is longer than GENL_NAMSIZ. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
90b2621fd4
commit
f1e79e2080
1 changed files with 1 additions and 0 deletions
|
@ -142,6 +142,7 @@ int genl_register_mc_group(struct genl_family *family,
|
|||
int err = 0;
|
||||
|
||||
BUG_ON(grp->name[0] == '\0');
|
||||
BUG_ON(memchr(grp->name, '\0', GENL_NAMSIZ) == NULL);
|
||||
|
||||
genl_lock();
|
||||
|
||||
|
|
Loading…
Reference in a new issue