From 09d4fa0515efff70fa71a67a44eb30d9f70ae5da Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sun, 18 Sep 2022 18:49:02 +0800 Subject: [PATCH] fix: string overflow --- judger/uoj_judger/run/run_program_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judger/uoj_judger/run/run_program_conf.h b/judger/uoj_judger/run/run_program_conf.h index 7bce162..6498404 100644 --- a/judger/uoj_judger/run/run_program_conf.h +++ b/judger/uoj_judger/run/run_program_conf.h @@ -42,7 +42,7 @@ string dirname(const string &path) { } } string getcwdp(pid_t pid) { - char s[20]; + char s[50]; char cwd[MaxPathLen + 1]; if (pid != 0) { sprintf(s, "/proc/%lld/cwd", (long long int)pid);