exec-invoke: correct dont_close[] size
THis needs 15 entries as far as I can count, not just 14.
Follow-up for: 5686391b00
Sniff.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
82e00a3f62
commit
07296542d6
@@ -3519,7 +3519,7 @@ static int close_remaining_fds(
|
||||
const int *fds, size_t n_fds) {
|
||||
|
||||
size_t n_dont_close = 0;
|
||||
int dont_close[n_fds + 14];
|
||||
int dont_close[n_fds + 15];
|
||||
|
||||
assert(params);
|
||||
|
||||
@@ -3555,6 +3555,8 @@ static int close_remaining_fds(
|
||||
if (params->user_lookup_fd >= 0)
|
||||
dont_close[n_dont_close++] = params->user_lookup_fd;
|
||||
|
||||
assert(n_dont_close <= ELEMENTSOF(dont_close));
|
||||
|
||||
return close_all_fds(dont_close, n_dont_close);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user