qcacld-3.0: Variable over written in hdd_set_app_type2_parser.

qcacld-2.0 to qcacld-3.0 propagation

Currently in hdd_set_app_type2_parser, sscanf writes 4 bytes of data in
tcp_src_port and tcp_dst_port variable. The original size of variable
is 2 byte.

Update code to write appropriate size of data in variable.

Change-Id: Ifdbfa06da6cb7d0bfef4f4e105a6911950f1d6ad
CRs-Fixed: 859493
This commit is contained in:
Bhargav Shah
2015-07-08 10:21:37 +05:30
committed by Prakash Dhavali
parent af1f78ce9c
commit 2af79f7c44

View File

@@ -1794,14 +1794,14 @@ static int hdd_set_app_type2_parser(hdd_adapter_t *adapter,
memset(&params, 0, sizeof(tSirAppType2Params));
ret = sscanf(arg, "%17s %16s %x %x %x %u %u %u %u %u %u %u %u %u %u",
ret = sscanf(arg, "%17s %16s %x %x %x %u %u %hu %hu %u %u %u %u %u %u",
mac_addr, rc4_key, (unsigned int *)&params.ip_id,
(unsigned int *)&params.ip_device_ip,
(unsigned int *)&params.ip_server_ip,
(unsigned int *)&params.tcp_seq,
(unsigned int *)&params.tcp_ack_seq,
(unsigned int *)&params.tcp_src_port,
(unsigned int *)&params.tcp_dst_port,
(uint16_t *)&params.tcp_src_port,
(uint16_t *)&params.tcp_dst_port,
(unsigned int *)&params.keepalive_init,
(unsigned int *)&params.keepalive_min,
(unsigned int *)&params.keepalive_max,