Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tags framesize endless loop #336

Merged
merged 2 commits into from
Nov 16, 2020
Merged

Conversation

troisiemetype
Copy link
Contributor

I've run into a problem while parsing tags in mp3 files with embedded images (APIC frames), with my program freezing.
It appears that the for loop which populate the value buffer has an int16_t as a counter, thus overflowing when frame size is above 65535 bytes. I've changed it to an int32_t.

Besides, I needed some other tags to be extracted for my projects, I've thus added the following ones :
TRCK / TRKtrack number (+ total tracks)
TPOS / TPA part of a set (+ total set) i.e. if the album has several discs.
POPM / POP popularimeter, aka rating.
TCMP "part of a compilation". It's not clear if this one is an off-standard added by iTunes, or if it's included in ID3v4

Pierre-Loup Martin added 2 commits November 15, 2020 19:05
…ned into the fs namespace in esp32 libraries.
Changed framesize loop with 32bit counter to avoid endless loops for large frames (like APIC).
@troisiemetype
Copy link
Contributor Author

Oh, I've forgot to save the file before commiting (git can sometimes be confusing for me !)
I was looking for a way to just parse tags without hanging it over to the player afterwards, and I've used the callback to do so, by transmitting an "end of file" tag.
Thus the cb.md("eof", false, "id3"); that has been inserted in to places in AudioFileSourceID3::read

That was not my intent to push this one.

Copy link
Owner

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@earlephilhower earlephilhower merged commit 2dc245f into earlephilhower:master Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants