hikptool/0079-hikptool-nic-Fix-bad-usage-of-format-string.patch
zhangyuyang 9266dc4f4d hikptool: Modify the review comments to increase the reliability of the code
Synchronize code, Modify the review comments to increase the reliability of the code

Signed-off-by: veega2022 <zhuweijia@huawei.com>
(cherry picked from commit d2a23f9ffed0201385c7864b9cd58312fb395cb6)
2024-11-26 16:32:40 +08:00

32 lines
1.0 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From dd185f7120e3a55af2ef4fc061aa3a271a986a1d Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Thu, 29 Aug 2024 10:11:47 +0800
Subject: [PATCH 17/27] hikptool/nic: Fix bad usage of format string
The format string lacks parameters, which may cause
information leakage. This patch fixes it.
Fixes: 8244390e29a3 ("hikptool/nic: Fix the Code review comments")
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
net/nic/nic_ppp/hikp_nic_ppp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/nic/nic_ppp/hikp_nic_ppp.c b/net/nic/nic_ppp/hikp_nic_ppp.c
index c070666..96f317b 100644
--- a/net/nic/nic_ppp/hikp_nic_ppp.c
+++ b/net/nic/nic_ppp/hikp_nic_ppp.c
@@ -1077,7 +1077,7 @@ static int hikp_nic_check_hw_res(struct hikp_nic_ppp_hw_resources *hw_res)
return -EINVAL;
}
if (hw_res->mng_tbl_size == 0) {
- HIKP_ERROR_PRINT("VF VLAN Table size (%uis zero!\n");
+ HIKP_ERROR_PRINT("Manager Table size should not be zero!\n");
return -EINVAL;
}
if (hw_res->mac_id >= HIKP_PPP_MAX_MAC_ID_NUM) {
--
2.45.0.windows.1