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:
Masatake YAMATO 2013-03-19 01:47:27 +00:00 committed by David S. Miller
parent 90b2621fd4
commit f1e79e2080
1 changed files with 1 additions and 0 deletions

View File

@ -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();