Skip to content

Commit

Permalink
genetlink: trigger BUG_ON if a group name is too long
Browse files Browse the repository at this point in the history
Trigger BUG_ON if a group name is longer than GENL_NAMSIZ.

Signed-off-by: Masatake YAMATO <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
masatake authored and davem330 committed Mar 20, 2013
1 parent 90b2621 commit f1e79e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/netlink/genetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit f1e79e2

Please sign in to comment.