summaryrefslogtreecommitdiffstats
path: root/net/netlink/genetlink.c
diff options
context:
space:
mode:
authorMasatake YAMATO <yamato@redhat.com>2013-03-19 01:47:27 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-20 12:05:51 -0400
commitf1e79e208076ffe7bad97158275f1c572c04f5c7 (patch)
treece2a0769199516ab9581f910266c51a8affdf1f1 /net/netlink/genetlink.c
parent90b2621fd465949e1714127e829a79160de14b38 (diff)
downloadop-kernel-dev-f1e79e208076ffe7bad97158275f1c572c04f5c7.zip
op-kernel-dev-f1e79e208076ffe7bad97158275f1c572c04f5c7.tar.gz
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>
Diffstat (limited to 'net/netlink/genetlink.c')
-rw-r--r--net/netlink/genetlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index f2aabb6..5a55be3 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -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();
OpenPOWER on IntegriCloud