summaryrefslogtreecommitdiff
path: root/0161-bugfix-for-workdir-len-verify.patch
blob: 238e9b5b20a583cc34b1d2cd407ff73cab53c5be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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