Unverified Commit a9150a3f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15094 netfilter: x_tables: fix LED ID check in led_tg_check()

parents 92cdca1a 274eb0a2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -97,7 +97,9 @@ static int led_tg_check(const struct xt_tgchk_param *par)
	struct xt_led_info_internal *ledinternal;
	int err;

	if (ledinfo->id[0] == '\0')
	/* Bail out if empty string or not a string at all. */
	if (ledinfo->id[0] == '\0' ||
	    !memchr(ledinfo->id, '\0', sizeof(ledinfo->id)))
		return -EINVAL;

	mutex_lock(&xt_led_mutex);