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

Commit 31579904 authored by Praveen Kurapati's avatar Praveen Kurapati Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa3: fix to off-by-one read issue



There is off-by-one read issue in function ipa3_is_vlan_mode.
Add fix to overcome this issue.

Change-Id: If087a762166f09d8786352de680db6d46b70b794
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
parent e4bc5ff2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -4414,7 +4414,7 @@ int ipa3_is_vlan_mode(enum ipa_vlan_ifaces iface, bool *res)
		return -EINVAL;
	}

	if (iface < 0 || iface > IPA_VLAN_IF_MAX) {
	if (iface < 0 || iface >= IPA_VLAN_IF_MAX) {
		IPAERR("invalid iface %d\n", iface);
		return -EINVAL;
	}