Found the problem file.

NOW TO DEBUG
This commit is contained in:
Caleb Gardner
2022-06-18 06:46:00 -05:00
parent 9ac8fef3b2
commit 96b38935a6
3 changed files with 11 additions and 5 deletions
+6
View File
@@ -2,6 +2,8 @@ package metadata
import (
"encoding/binary"
"errors"
"fmt"
"io"
"github.com/CalebQ42/squashfs/internal/decompress"
@@ -36,6 +38,10 @@ func (r *Reader) Advance() error {
}
comp := size&0x8000 != 0x8000
size &^= 0x8000
if size > 8196 {
fmt.Println("uhoh")
return errors.New("AH")
}
r.cur = io.LimitReader(r.master, int64(size))
if comp {
r.cur, err = r.d.Reader(r.cur)