1.3 KiB
1.3 KiB
Pre12 Batch 05: ZSTD window lower bound
Change
- Removed only the
rq->em->zstd_windowlog + 10 < 10subcondition fromz_erofs_zstd_decompress. - Preserved the
> 20upper bound, theoutputsize == 0check, everyreturn (-1), all ZSTD calls, resource release, and the complete disabled#elsestub. - Did not change ZSTD configuration parsing, accepted configuration range, conditional compilation, errno behavior, or control flow after the guard.
Static proof
struct erofs_mount.zstd_windowlogisuint8_t, so integer promotion gives a value in the range 0 through 255.- Adding 10 therefore produces a minimum value of 10; comparison with
< 10is unreachable for every representable field value. z_erofs_load_zstd_configstill rejectswindowlog > 10, so configured mount values and the remaining decompression upper-bound behavior are unchanged.- Normalized function comparison confirms that the only removed logical
tokens are the single unreachable lower-bound subcondition and its
||. git diff --checkandgit diff --cached --checkcompleted without errors.
Tests not run
Per the execution constraints, no build, QEMU run, smoke test, feature test,
or other dynamic test was run. A FreeBSD KLD build with WITH_ZSTDIO=1
remains mandatory during final validation so this enabled function body is
compiled.