msm_rmnet: Fix potential memory corruption

Usage of legacy string manipulation function sprintf could lead to
memory corruption as the number of bytes to be written to the
destination is not bounded. Replace sprintf with snprintf where the
number of bytes to be written is explicitly specified.

CRs-fixed: 672202
Change-Id: I1788d655f048124c6b7cccee4345d8239743ada8
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
msm_rmnet_sdio: Fix potential memory corruption

Usage of legacy string manipulation function sprintf could lead to
memory corruption as the number of bytes to be written to the
destination is not bounded. Replace sprintf with snprintf where the
number of bytes to be written is explicitly specified.

CRs-fixed: 672202
Change-Id: Ic26bea1ddf9570a4970fc8c4373b066aa385e427
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
msm: msm_bus: Fix memory leak during RPM transaction

This is a serious bug that eventually cripples the system due to
lost memory.

CRs-Fixed: 442381
Change-Id: If4d33b35475a33b1602a1d923031345b47af963e
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
diag: dci: Check for request pkt length being lesser than minimum length

Added checks for DCI request packets to be greater than the minimum
packet length. We would drop the request and print an error otherwise.

CRs-Fixed: 483310
Change-Id: I0d89ded58ee97a08ebe6b06b411ac17d2fcb11df
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
diag: Fix log, event and msg mask status in control packets

The status field in the logs, events and msg mask update control
packets is set incorrectly to a defaul t value. This patch adds
the correct status value in the control packet sent from Apps
to peripherals.

Change-Id: I7850db055b5c4aad0d3e6ffceb6411be03090091
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
diag: Increase the maximum number of SSIDs per msg mask range

Diag was using a max ssid range of 100. This has increased due
to addition of new SSIDs. This patch increases the range to 200
and adds checks to limit the SSID masks to this range. This
changes the order of sending the feature masks, sending it before
the msg masks to let the peripherals know the features Apps
support.

Change-Id: Id913712b29208054ab036743ffc4122699501bc3
Signed-off-by: Katish Paran <kparan@codeaurora.org>
diag: Change implementation of diag log masks

Currently, the structure of diag log masks can lead to buffer
corruption when there is huge different between the log masks
of the Apss processor and the peripherals. Make changes to
log masks to be of constant size.

Change-Id: I9920bbcc19e75c10ec7267808c9fc4afaafeff5b
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
mmc: debug information.