Sorrow446 / go-mp4tag

MP4 tag library written in Go.
MIT License
12 stars 7 forks source link

Reading Mp4 leads to blowing stack. #14

Open medcelerate opened 1 month ago

medcelerate commented 1 month ago

Attempting to call the .Read method from the tag reader causes a stack overflow.

fatal error: stack overflow

runtime stack:
runtime.throw({0x3943a5?, 0xb7bc5ff860?})
        C:/Program Files/Go/src/runtime/panic.go:1067 +0x4d fp=0xb7bc5ff820 sp=0xb7bc5ff7f0 pc=0x1f9fcd
runtime.newstack()
        C:/Program Files/Go/src/runtime/stack.go:1117 +0x5cc fp=0xb7bc5ff960 sp=0xb7bc5ff820 pc=0x1df0cc
runtime.morestack()
        C:/Program Files/Go/src/runtime/asm_amd64.s:621 +0x79 fp=0xb7bc5ff968 sp=0xb7bc5ff960 pc=0x1ffbb9

goroutine 7 gp=0xc000057500 m=8 mp=0xc000500008 [running]:
syscall.(*LazyProc).Find(0x541dc0)
        C:/Program Files/Go/src/syscall/dll_windows.go:242 +0x16b fp=0xc0201e1340 sp=0xc0201e1338 pc=0x22b16b
syscall.(*LazyProc).mustFind(...)
        C:/Program Files/Go/src/syscall/dll_windows.go:267
syscall.(*LazyProc).Addr(...)
        C:/Program Files/Go/src/syscall/dll_windows.go:276
syscall.readFile(0x1b0, {0xc010815e50?, 0x4, 0xc0201e1478?}, 0x1?, 0x800000?)
        C:/Program Files/Go/src/syscall/zsyscall_windows.go:1019 +0x4c fp=0xc0201e13b0 sp=0xc0201e1340 pc=0x23146c
syscall.ReadFile(...)
        C:/Program Files/Go/src/syscall/syscall_windows.go:443
syscall.Read(0xc0000a2248?, {0xc010815e50?, 0xc0201e1438?, 0x1fd7c6?})
        C:/Program Files/Go/src/syscall/syscall_windows.go:422 +0x2d fp=0xc0201e1408 sp=0xc0201e13b0 pc=0x22dd0d
internal/poll.(*FD).Read(0xc0000a2248, {0xc010815e50, 0x4, 0x4})
        C:/Program Files/Go/src/internal/poll/fd_windows.go:424 +0x1b9 fp=0xc0201e14b0 sp=0xc0201e1408 pc=0x2456d9
os.(*File).read(...)
        C:/Program Files/Go/src/os/file_posix.go:29
os.(*File).Read(0xc0000a0008, {0xc010815e50?, 0xc0201e1528?, 0x1fb149?})
        C:/Program Files/Go/src/os/file.go:124 +0x52 fp=0xc0201e14f0 sp=0xc0201e14b0 pc=0x24a792
io.ReadAtLeast({0x3f32c0, 0xc0000a0008}, {0xc010815e50, 0x4, 0x4}, 0x4)
        C:/Program Files/Go/src/io/io.go:335 +0x90 fp=0xc0201e1538 sp=0xc0201e14f0 pc=0x223d50
io.ReadFull(...)
        C:/Program Files/Go/src/io/io.go:354
github.com/Sorrow446/go-mp4tag.MP4.readI32BE({0xc0000a0008, {0xc00009a3f0, 0x23}, 0x803ff8b, 0x1})
        C:/Users/djevo1/go/pkg/mod/github.com/!sorrow446/go-mp4tag@v0.0.0-20240130220823-68ce31d53e37/read.go:64 +0x5f fp=0xc0201e1580 sp=0xc0201e1538 pc=0x26f0ff
Sorrow446 commented 1 month ago

Need the track please.

medcelerate commented 1 month ago

See attached https://drive.google.com/file/d/1p0F6w3-I9sGuzAqNTlWn63VcGAgpVzsS/view?usp=drive_link

Sorrow446 commented 1 month ago

It doesn't like the fact that there's a cprt (copyright) box at moov.udta. It should be at moov.udta.meta.ilst. The path gets malformed for some reason .moov.udta.cprt.§�XN. Will look into it.

medcelerate commented 1 month ago

Any luck on this?