From fa25a8923e47ed6b65e0bcd08954589f5b26092c Mon Sep 17 00:00:00 2001 From: jikai Date: Wed, 5 Jun 2024 02:10:48 +0000 Subject: [PATCH 102/108] fix false engine rootpath reference Signed-off-by: jikai --- src/daemon/config/isulad_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/config/isulad_config.c b/src/daemon/config/isulad_config.c index 80689bce..d7b54498 100644 --- a/src/daemon/config/isulad_config.c +++ b/src/daemon/config/isulad_config.c @@ -398,12 +398,12 @@ char *conf_get_sandbox_rootpath(void) ERROR("Get rootpath failed"); return epath; } - if (strlen(rootpath) > (PATH_MAX - strlen(ENGINE_ROOTPATH_NAME)) - 2) { + if (strlen(rootpath) > (PATH_MAX - strlen(SANDBOX_ROOTPATH_NAME)) - 2) { ERROR("Root path is too long"); return epath; } // rootpath + "/" + SANDBOX_ROOTPATH_NAME + "/0" - len = strlen(rootpath) + 1 + strlen(ENGINE_ROOTPATH_NAME) + 1; + len = strlen(rootpath) + 1 + strlen(SANDBOX_ROOTPATH_NAME) + 1; epath = util_smart_calloc_s(sizeof(char), len); if (epath == NULL) { ERROR("Out of memory"); -- 2.25.1