mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-13 04:50:07 +00:00
tools: acrn-crashlog: Fix potential issues for load_conf module of acrnprobe
This patch is to fix potential issues, which are reported by static analysis tool, for load_conf module of acrnprobe. Changes: 1. Check the range of id while loading configuration, to avoid memory corruption. 2. Use strncpy instead of strcpy to avoid buf overflow. Signed-off-by: Liu Xinwu <xinwu.liu@intel.com> Reviewed-by: Zhi Jin <zhi.jin@intel.com> Acked-by: Chen Gang <gang.c.chen@intel.com>
This commit is contained in:
@@ -200,7 +200,7 @@ struct conf_t conf;
|
||||
}) \
|
||||
)
|
||||
|
||||
int load_conf(char *path);
|
||||
int load_conf(const char *path);
|
||||
struct trigger_t *get_trigger_by_name(char *name);
|
||||
struct log_t *get_log_by_name(char *name);
|
||||
int sender_id(struct sender_t *sender);
|
||||
|
Reference in New Issue
Block a user