diff --git a/src/libutil/current-process.cc b/src/libutil/current-process.cc index 47aa137d8..f80f43ef0 100644 --- a/src/libutil/current-process.cc +++ b/src/libutil/current-process.cc @@ -38,6 +38,11 @@ unsigned int getMaxCPU() auto cpuMax = readFile(cpuFile); auto cpuMaxParts = tokenizeString>(cpuMax, " \n"); + + if (cpuMaxParts.size() != 2) { + return 0; + } + auto quota = cpuMaxParts[0]; auto period = cpuMaxParts[1]; if (quota != "max")