Commit 66e68ea
committed
image/compress-checksum: sanitize COMPRESS_MAX_THREADS override
A non-numeric or zero COMPRESS_MAX_THREADS was used raw in arithmetic:
both read as 0, setting compress_threads=0 (xz/zstd -T0 = 'use all
cores') and silently collapsing the cap — the opposite of intent. A
non-numeric value also leaked into compress_threads as a string,
breaking xz -T.
Reject non-numeric/non-positive overrides and fall back to the default
32 before clamping host_threads.
Signed-off-by: Igor Pecovnik <igor@armbian.com>1 parent 9c5e55a commit 66e68ea
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
0 commit comments