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>
crypto: msm: check potential integer overflow

According to the specification of AEAD, AEAD request crypt length is
not a fixed maximum and associated length is also same. This could
lead to potential integer overflow, thus allocating less memory. So
we need to check potential integer overflow on AEAD request length.

CRs-Fixed: 726872
Change-Id: Ie7708000bfd8c57e2fba8e02230a7ce9cdc9634c
Signed-off-by: William Clark <wclark@codeaurora.org>
ASoC: msm: qdsp6v2: check proxy port is open when closing

The current logic opens the afe proxy port only if the
proxy instance virtual port is opened. If only
pcm instance virtual port is opened and a close of the
afe proxy port is attempted, this causes the device to
crash due to a wait event timeout as the driver tries
to close an unopened afe port.
The change ensures that only if both the virtual ports
are opened, which in effect starts the proxy port,
the afe close commands for the proxy port is sent to DSP,
else return immediately.

Change-Id: I9450001c608208f3d8da22b2881a88db1c21d950
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
msm: wlan: Fix dangling pAdapter pointer in HDD.

On getting response from FW , SME calls hdd in
hdd_tx_per_hit_cb with pAdapter as argument.But
by that pAdapter in hdd might be removed.
As a part of fix, instead of passing pAdapter,
sessionId is passed. So when SME gets response from
FW , it will call hdd with sessionId and in hdd based
on sessionId a valid pAdapter would be used.

Change-Id: I50b484f2b2fbff17766ea14315132a9d6531e86b
CRs-Fixed: 699843
Signed-off-by: Kaushik, Sushant <skaushik@codeaurora.org>