Found the problem file.
NOW TO DEBUG
This commit is contained in:
+3
-3
@@ -290,9 +290,9 @@ func TestSTUFF(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
os.Remove(wd + "/testing/test.txt")
|
||||
testOut, _ := os.Create(wd + "/testing/test.txt")
|
||||
testFil, err := rdr.Open("PortableApps/Notepad++Portable/App/Readme.txt")
|
||||
os.Remove(wd + "/testing/test.xml")
|
||||
testOut, _ := os.Create(wd + "/testing/test.xml")
|
||||
testFil, err := rdr.Open("PortableApps/Notepad++Portable/App/Notepad++64/functionList/cobol-free.xml")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
+2
-2
@@ -72,8 +72,8 @@ func TestExtractQuick(t *testing.T) {
|
||||
}
|
||||
op := squashfs.DefaultOptions()
|
||||
op.Verbose = true
|
||||
sub :=
|
||||
err = rdr.ExtractWithOptions(libPath, op)
|
||||
sub, _ := rdr.Sub("PortableApps/Notepad++Portable/App/Notepad++64/functionList")
|
||||
err = sub.(*squashfs.FS).ExtractWithOptions(libPath, op)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user