We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1692fd4 commit 8665a22Copy full SHA for 8665a22
judge/runguard.cc
@@ -806,6 +806,8 @@ void setrestrictions()
806
807
/* Set additional environment variables. */
808
for (const auto &tokens : environment_variables) {
809
+ // Note that we explicitly *do not* free the string created by
810
+ // strdup as putenv does not copy that string, but uses it as is.
811
char *token = strtok(strdup(tokens.c_str()), ";");
812
while (token != nullptr) {
813
verbose("setting environment variable: %s", token);
0 commit comments