From 2af79f7c44b7d995fea6131f559406eeefbec3b3 Mon Sep 17 00:00:00 2001 From: Bhargav Shah Date: Wed, 8 Jul 2015 10:21:37 +0530 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 53afb626ddc2..1c8f70ac4738 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -1794,14 +1794,14 @@ static int hdd_set_app_type2_parser(hdd_adapter_t *adapter, memset(¶ms, 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 *)¶ms.ip_id, (unsigned int *)¶ms.ip_device_ip, (unsigned int *)¶ms.ip_server_ip, (unsigned int *)¶ms.tcp_seq, (unsigned int *)¶ms.tcp_ack_seq, - (unsigned int *)¶ms.tcp_src_port, - (unsigned int *)¶ms.tcp_dst_port, + (uint16_t *)¶ms.tcp_src_port, + (uint16_t *)¶ms.tcp_dst_port, (unsigned int *)¶ms.keepalive_init, (unsigned int *)¶ms.keepalive_min, (unsigned int *)¶ms.keepalive_max,