Treat argv and closure->run_argv of different sizes as a mismatch.

If argv and closure->run_argv match up to the point where we hit a
NULL but one of them has additional entries, we still need to rewrite
argv.
This commit is contained in:
Todd C. Miller
2022-08-18 15:15:06 -06:00
parent aef4a61886
commit 9f552471bc

View File

@@ -1468,6 +1468,8 @@ ptrace_intercept_execve(pid_t pid, struct intercept_closure *closure)
break;
}
}
if (closure->run_argv[i] != NULL || argv[i] != NULL)
argv_mismatch = true;
if (path_mismatch || argv_mismatch) {
/*