summaryrefslogtreecommitdiff
path: root/block/blk-zoned.c
diff options
context:
space:
mode:
authorJason Wang <wangborong@cdjrlc.com>2021-12-21 12:04:20 +0200
committerKalle Valo <quic_kvalo@quicinc.com>2021-12-22 08:02:08 +0200
commit9d364b828ae5c51ef732fea2830d278849ca8a3a (patch)
tree28be373f90896f77f07f03de3ace51b1a651fcec /block/blk-zoned.c
parent01417e57939faffebfdeb2aef1f4388e95cf9271 (diff)
ath10k: replace strlcpy with strscpy
The strlcpy should not be used because it doesn't limit the source length. So that it will lead some potential bugs. But the strscpy doesn't require reading memory from the src string beyond the specified "count" bytes, and since the return value is easier to error-check than strlcpy()'s. In addition, the implementation is robust to the string changing out from underneath it, unlike the current strlcpy() implementation. Thus, replace strlcpy with strscpy. Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20211221070931.725720-1-wangborong@cdjrlc.com
Diffstat (limited to 'block/blk-zoned.c')
0 files changed, 0 insertions, 0 deletions