n10v / id3v2

🎵 ID3 decoding and encoding library for Go
https://pkg.go.dev/github.com/bogem/id3v2/v2
MIT License
334 stars 50 forks source link

fix invalid comparison causing errors opening frame #75

Open partyfamine opened 2 years ago

partyfamine commented 2 years ago

I noticed that after modifying tags in foobar2000 that Open() would fail with the following error: frame went over tag area This was due to foobar2000 truncating the padding after the final frame and Open() was reading the audio data as the next frame size. The id == "" check should have caught this, but even though []byte{0, 0, 0, 0} will be printed as an empty string, it is not equivalent.

n10v commented 2 years ago

Hey @partyfamine, thanks a lot for this suggestion! Can you please add a test case for this situation? It will be a huge help!