Remove hardcoded refs from ociartifact code

Fixes: https://issues.redhat.com/browse/RUN-3578

Signed-off-by: Nicola Sella <nsella@redhat.com>
This commit is contained in:
Nicola Sella
2025-10-14 15:04:59 +02:00
parent d3c5c5d219
commit df4905d68b
512 changed files with 22910 additions and 19261 deletions

View File

@@ -485,7 +485,7 @@ func (f *decompressor) readHuffman() error {
f.nb -= 5 + 5 + 4
// (HCLEN+4)*3 bits: code lengths in the magic codeOrder order.
for i := 0; i < nclen; i++ {
for i := range nclen {
for f.nb < 3 {
if err := f.moreBits(); err != nil {
return err
@@ -776,7 +776,7 @@ func fixedHuffmanDecoderInit() {
fixedOnce.Do(func() {
// These come from the RFC section 3.2.6.
var bits [288]int
for i := 0; i < 144; i++ {
for i := range 144 {
bits[i] = 8
}
for i := 144; i < 256; i++ {