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

Commit ba361ff9 authored by Mohammed Javid's avatar Mohammed Javid
Browse files

msm: ipa: Fix to add string NULL terminator



Missing null terminator to userspcae 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 71721a67
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1661,6 +1661,7 @@ static int ipa_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
				IPAWANERR("Failed to allocate memory.\n");
				return -ENOMEM;
			}
			extend_ioctl_data.u.if_name[IFNAMSIZ-1] = '\0';
			len = sizeof(wan_msg->upstream_ifname) >
			sizeof(extend_ioctl_data.u.if_name) ?
				sizeof(extend_ioctl_data.u.if_name) :
+1 −0
Original line number Diff line number Diff line
@@ -1740,6 +1740,7 @@ static int ipa3_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
				IPAWANERR("Failed to allocate memory.\n");
				return -ENOMEM;
			}
			extend_ioctl_data.u.if_name[IFNAMSIZ-1] = '\0';
			len = sizeof(wan_msg->upstream_ifname) >
			sizeof(extend_ioctl_data.u.if_name) ?
				sizeof(extend_ioctl_data.u.if_name) :