summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2023-07-26 14:53:41 +0800
committerliuxueli <[email protected]>2023-07-26 14:53:41 +0800
commite41c90c5f53edfcdb8824b15b7207e8df94bc34a (patch)
tree187a53f7361331fc4b5e22ccd828f6d5f228f1c3
parent39ed85fb5bd00ae1538a72868cfc0b7181bd8f81 (diff)
ASAN模式运行初始化时存在非法读v6.0.44
-rw-r--r--src/tsg_entry.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp
index 74c0a85..201997d 100644
--- a/src/tsg_entry.cpp
+++ b/src/tsg_entry.cpp
@@ -178,15 +178,15 @@ static int get_deploy_mode(void)
int ret=sapp_get_platform_opt(SPO_DEPLOYMENT_MODE_STR, s_mode, &len);
if(ret>=0)
{
- if((memcmp(s_mode, "mirror", strlen(s_mode)))==0 || (memcmp(s_mode, "dumpfile", strlen(s_mode)))==0)
+ if((strcmp(s_mode, "mirror"))==0 || (strcmp(s_mode, "dumpfile"))==0)
{
g_tsg_para.deploy_mode=DEPLOY_MODE_MIRROR;
}
- else if((memcmp(s_mode, "inline", strlen(s_mode)))==0)
+ else if((strcmp(s_mode, "inline"))==0)
{
g_tsg_para.deploy_mode=DEPLOY_MODE_INLINE;
}
- else if((memcmp(s_mode, "transparent", strlen(s_mode)))==0)
+ else if((strcmp(s_mode, "transparent"))==0)
{
g_tsg_para.deploy_mode=DEPLOY_MODE_TRANSPARENT;
}