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

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

parents 3d318b1e 481ac2a3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -111,7 +111,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);