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

Commit 5feafff9 authored by Mohammed Javid's avatar Mohammed Javid
Browse files

msm: ipa: Fix to add string NULL terminator



Missing null terminator to userspace provided
string leads to strlen buffer overflow in strlcpy function.
Added code changes to fix string NULL terminator issue.

Change-Id: I3f9d5f22fbb26f68de12370bc5e07a4e6bc2ced9
Acked-by: default avatarAshok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent f0a4ec7d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1707,7 +1707,7 @@ static int ipa3_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
						GFP_KERNEL);
			if (!wan_msg)
				return -ENOMEM;

			ext_ioctl_data.u.if_name[IFNAMSIZ-1] = '\0';
			len = sizeof(wan_msg->upstream_ifname) >
			sizeof(ext_ioctl_data.u.if_name) ?
				sizeof(ext_ioctl_data.u.if_name) :