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

Commit c90c79c6 authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

net: rmnet_data: Fix potential memory corruption



Fix an out of bounds array access during virtual
net device creation

CRs-fixed: 695032
Change-Id: Ie8ae1f25122f685c22d139d1abf06acf55d46782
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent b31147a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ int rmnet_vnd_create_dev(int id, struct net_device **new_device,
	char dev_prefix[IFNAMSIZ];
	int p, rc = 0;

	if (id < 0 || id > RMNET_DATA_MAX_VND) {
	if (id < 0 || id >= RMNET_DATA_MAX_VND) {
		*new_device = 0;
		return RMNET_CONFIG_BAD_ARGUMENTS;
	}