mirror of https://github.com/helm/helm
LoadArchiveFiles checks the aggregate decompression budget four times, and three of them are strict: hd.Size > remainingSize in this same loop, and both comparisons in BudgetedReader, which enforces the identical MaxDecompressedChartSize for directory loads. Only the post-copy check used remainingSize <= 0, so a chart whose contents exactly fill the budget drove remainingSize to zero and was rejected with "decompressed chart is larger than the maximum size" - a claim that is false, since it is equal. The same chart therefore loaded from a directory and failed from a .tgz. Note that after this change the clause is unreachable: io.LimitReader caps bytesWritten at remainingSize, so remainingSize can never go below zero. It is kept as a guard in case that changes. Signed-off-by: manon <youdie006@users.noreply.github.com>pull/32635/head
parent
fa11636b01
commit
c6ddeb2ff8
Loading…
Reference in new issue