linux-stable/drivers/soc
Niklas Cassel 58b03626a7 soc: qcom: wcnss_ctrl: Avoid string overflow
[ Upstream commit 4c96ed170d ]

'chinfo.name' is used as a NUL-terminated string, but using strncpy() with
the length equal to the buffer size may result in lack of the termination:

drivers//soc/qcom/wcnss_ctrl.c: In function 'qcom_wcnss_open_channel':
drivers//soc/qcom/wcnss_ctrl.c:284:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
  strncpy(chinfo.name, name, sizeof(chinfo.name));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This changes it to use the safer strscpy() instead.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-20 17:59:59 +01:00
..
actions
amlogic meson-gx-socinfo: Fix package id parsing 2018-02-25 11:07:56 +01:00
atmel
bcm soc: bcm: brcmstb: Don't leak device tree node reference 2019-02-12 19:46:00 +01:00
dove License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsl soc: fsl: qbman: avoid race in clearing QMan interrupt 2019-03-13 14:03:19 -07:00
imx soc: imx: gpc: fix PDN delay 2019-11-20 17:59:46 +01:00
lantiq MIPS: lantiq: gphy: Drop reboot/remove reset asserts 2018-06-05 11:41:58 +02:00
mediatek soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher 2019-06-15 11:54:55 +02:00
qcom soc: qcom: wcnss_ctrl: Avoid string overflow 2019-11-20 17:59:59 +01:00
renesas License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rockchip soc: rockchip: Set the proper PWM for rk3288 2019-06-15 11:54:55 +02:00
samsung
sunxi
tegra soc/tegra: pmc: Drop locking from tegra_powergate_is_powered() 2019-04-20 09:15:06 +02:00
ti soc: ti: QMSS: Fix usage of irq_set_affinity_hint 2018-11-21 09:24:09 +01:00
ux500
versatile
zte
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00