Unverified Commit ab2aaa31 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents adb237b9 e25c7a75
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -316,6 +316,14 @@ static int nfnl_osf_add_callback(struct net *net, struct sock *ctnl,

	f = nla_data(osf_attrs[OSF_ATTR_FINGER]);

	if (f->opt_num > ARRAY_SIZE(f->opt))
		return -EINVAL;

	if (!memchr(f->genre, 0, MAXGENRELEN) ||
	    !memchr(f->subtype, 0, MAXGENRELEN) ||
	    !memchr(f->version, 0, MAXGENRELEN))
		return -EINVAL;

	kf = kmalloc(sizeof(struct nf_osf_finger), GFP_KERNEL);
	if (!kf)
		return -ENOMEM;