Commit f1e79e20 authored by Masatake YAMATO's avatar Masatake YAMATO Committed by David S. Miller

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: default avatarMasatake YAMATO <yamato@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90b2621f
...@@ -142,6 +142,7 @@ int genl_register_mc_group(struct genl_family *family, ...@@ -142,6 +142,7 @@ int genl_register_mc_group(struct genl_family *family,
int err = 0; int err = 0;
BUG_ON(grp->name[0] == '\0'); BUG_ON(grp->name[0] == '\0');
BUG_ON(memchr(grp->name, '\0', GENL_NAMSIZ) == NULL);
genl_lock(); genl_lock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment