Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7452518e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "tspp: Protect against buffer overflow"

parents 3c170981 a2130184
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1827,7 +1827,7 @@ int tspp_add_filter(u32 dev, u32 channel_id,
	}

	if (filter->priority >= TSPP_NUM_PRIORITIES) {
		pr_err("tspp invalid source");
		pr_err("tspp invalid filter priority");
		return -ENOSR;
	}

@@ -1956,6 +1956,10 @@ int tspp_remove_filter(u32 dev, u32 channel_id,
		pr_err("tspp_remove: can't find device %i", dev);
		return -ENODEV;
	}
	if (filter->priority >= TSPP_NUM_PRIORITIES) {
		pr_err("tspp invalid filter priority");
		return -ENOSR;
	}
	channel = &pdev->channels[channel_id];

	src = channel->src;
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ struct tspp_filter {
	int pid;
	int mask;
	enum tspp_mode mode;
	int priority;	/* 0 - 15 */
	unsigned int priority;	/* 0 - 15 */
	int decrypt;
	enum tspp_source source;
};