msm: ipa: add null terminator

Add null terminator at the end of string
extend_ioctl_data.u.rmnet_mux_val.vchannel_name
to avoid potential security issue.

Change-Id: I57fe3a9f7e3ad6a499b62a9cfc49bc6b2f3b42e0
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
Shihuan Liu 2017-10-06 20:38:02 -07:00 committed by Gerrit - the friendly Code Review server
parent 4a2eee6aa0
commit c1d93f8b66
1 changed files with 2 additions and 0 deletions

View File

@ -1358,6 +1358,8 @@ static int ipa_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
mutex_unlock(&add_mux_channel_lock);
return -EFAULT;
}
extend_ioctl_data.u.rmnet_mux_val.vchannel_name
[IFNAMSIZ-1] = '\0';
IPAWANDBG("ADD_MUX_CHANNEL(%d, name: %s)\n",
extend_ioctl_data.u.rmnet_mux_val.mux_id,
extend_ioctl_data.u.rmnet_mux_val.vchannel_name);