net: hns3: fix strncpy() not using dest-buf length as length issue
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7B8SA CVE: NA ---------------------------------------------------------------------- Now, strncpy() in hns3_dbg_fill_content() use src-length as copy-length, it may result in dest-buf overflow. This patch add some values check to avoid this issue. Fixes: 721091d1 ("net: hns3: refactor dump bd info of debugfs") Signed-off-by:Hao Chen <chenhao418@huawei.com>
Loading
Please sign in to comment