Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Adam Hathcock
2026-06-01 14:25:38 +01:00
committed by GitHub
parent 07319f61bf
commit 98b9d86a5c

View File

@@ -150,6 +150,10 @@ public sealed partial class LZipStream
}
var basePower = header[5] & 0x1F;
var subtractionNumerator = (header[5] & 0xE0) >> 5;
if (basePower < 4 || basePower > 30)
{
return 0;
}
return (1 << basePower) - (subtractionNumerator * (1 << (basePower - 4)));
}
finally