diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-03-29 00:06:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-27 14:13:05 +0900 |
commit | 8d785057c92b74247d2073f7037a374be70cb2e1 (patch) | |
tree | 1e4efec3f5aa86f63366ef3b4ef54c51349331ae /include/linux/bit_spinlock.h | |
parent | d746cb42155c2ec4ef5a70105ad01d181703d1d2 (diff) |
ath10k: avoid possible string overflow
commit 6707ba0105a2d350710bc0a537a98f49eb4b895d upstream.
The way that 'strncat' is used here raised a warning in gcc-8:
drivers/net/wireless/ath/ath10k/wmi.c: In function 'ath10k_wmi_tpc_stats_final_disp_tables':
drivers/net/wireless/ath/ath10k/wmi.c:4649:4: error: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
Effectively, this is simply a strcat() but the use of strncat() suggests
some form of overflow check. Regardless of whether this might actually
overflow, using strlcat() instead of strncat() avoids the warning and
makes the code more robust.
Fixes: bc64d05220f3 ("ath10k: debugfs support to get final TPC stats for 10.4 variants")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/bit_spinlock.h')
0 files changed, 0 insertions, 0 deletions