From 3c9d51bfdf0e71ac846946d746003139bf3a02c8 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Tue, 26 Nov 2024 23:46:52 +1400
Subject: [PATCH 03/19] bugfix for workdir len verify

Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
 src/daemon/modules/runtime/isula/isula_rt_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c
index e628c3fe..22608e4c 100644
--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c
+++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c
@@ -786,8 +786,8 @@ static int shielded_output_check(const char *output, const char *workdir)
         return 0;
     }
 
-    if (sizeof(chdir_pattern) > PATH_MAX - strlen("chdir ") - strlen(" failed")) {
-        INFO("chdir_pattern is too long");
+    if (strlen(workdir) > PATH_MAX - strlen("chdir ") - strlen(" failed")) {
+        INFO("workdir is too long");
         return -1;
     }
 
-- 
2.23.0

