mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
local-derivation-goal: fix sized comparison when checking sandbox profile length
This commit is contained in:
parent
681d7f7e57
commit
bbc4977fed
1 changed files with 1 additions and 1 deletions
|
@ -2235,7 +2235,7 @@ void LocalDerivationGoal::runChild()
|
||||||
// We create multiple allow lists, to avoid exceeding a limit in the darwin sandbox interpreter.
|
// We create multiple allow lists, to avoid exceeding a limit in the darwin sandbox interpreter.
|
||||||
// See https://github.com/NixOS/nix/issues/4119
|
// See https://github.com/NixOS/nix/issues/4119
|
||||||
// We split our allow groups approximately at half the actual limit, 1 << 16
|
// We split our allow groups approximately at half the actual limit, 1 << 16
|
||||||
const int breakpoint = sandboxProfile.length() + (1 << 14);
|
const size_t breakpoint = sandboxProfile.length() + (1 << 14);
|
||||||
for (auto & i : pathsInChroot) {
|
for (auto & i : pathsInChroot) {
|
||||||
|
|
||||||
if (sandboxProfile.length() >= breakpoint) {
|
if (sandboxProfile.length() >= breakpoint) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue