Merge "msm: ipa: prevent string buffer overflows"

This commit is contained in:
Linux Build Service Account 2017-07-30 19:50:55 -07:00 committed by Gerrit - the friendly Code Review server
commit 7d9cfb4019
1 changed files with 3 additions and 0 deletions

View File

@ -2395,6 +2395,9 @@ int rmnet_ipa_set_data_quota(struct wan_ioctl_set_data_quota *data)
int index;
struct ipa_set_data_usage_quota_req_msg_v01 req;
/* prevent string buffer overflows */
data->interface_name[IFNAMSIZ-1] = '\0';
index = find_vchannel_name_index(data->interface_name);
IPAWANERR("iface name %s, quota %lu\n",
data->interface_name,