mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-24 23:48:41 +00:00
fix: string overflow
This commit is contained in:
parent
410631075e
commit
09d4fa0515
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user