1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

local-derivation-goal: fix sized comparison when checking sandbox profile length

This commit is contained in:
Jörg Thalheim 2025-04-03 09:48:53 +02:00
parent 681d7f7e57
commit bbc4977fed

View file

@ -2235,7 +2235,7 @@ void LocalDerivationGoal::runChild()
// We create multiple allow lists, to avoid exceeding a limit in the darwin sandbox interpreter.
// See https://github.com/NixOS/nix/issues/4119
// 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) {
if (sandboxProfile.length() >= breakpoint) {