Merge "msm: ipa: Fix string out of bound issue."

This commit is contained in:
qctecmdr 2021-03-18 05:17:44 -07:00 committed by Gerrit - the friendly Code Review server
commit dedd67b092

View File

@ -2095,6 +2095,8 @@ static int ipa3_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
/* Get MTU */
case RMNET_IOCTL_GET_MTU:
mux_channel = rmnet_ipa3_ctx->mux_channel;
ext_ioctl_data.u.mtu_params.if_name
[IFNAMSIZ-1] = '\0';
rmnet_index =
find_vchannel_name_index(ext_ioctl_data.u.mtu_params.if_name);
@ -2115,6 +2117,8 @@ static int ipa3_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
/* Set MTU */
case RMNET_IOCTL_SET_MTU:
mux_channel = rmnet_ipa3_ctx->mux_channel;
ext_ioctl_data.u.mtu_params.if_name
[IFNAMSIZ-1] = '\0';
rmnet_index =
find_vchannel_name_index(ext_ioctl_data.u.mtu_params.if_name);