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

ID3 Parsing: Only convert unicode if framesize > 1 #45

Merged
merged 1 commit into from
Jun 14, 2020

Conversation

dubit0
Copy link

@dubit0 dubit0 commented Jun 13, 2020

The current id3 parsing code leads to a lock-up of the cpu if the
framesize is 1 and unicode conversion needs to be done. This is since

i = framesize -1

and the conversion loop condition is m<i-1. For framesize = 1 -> i=0 and
the condition m<-1 for unit16_t m keeps the cpu busy for a while and
reads way above the memory boundary of the array 'value' inside the loop.

This patch fixes the problem by not entering the unicode conversion if
the framesize is <= 1.

The current id3 parsing code leads to a lock-up of the cpu if the
framesize is 1 and unicode conversion needs to be done. This is since

i = framesize -1

and the conversion loop condition is m<i-1. For framesize = 1 -> i=0 and
the condition m<-1 for unit16_t m keeps the cpu busy for a while and
reads way above the memory boundary of the array 'value' inside the loop.

This patch fixes the problem by not entering the unicode conversion if
the framesize is <= 1.
@schreibfaul1 schreibfaul1 merged commit d4d5153 into schreibfaul1:master Jun 14, 2020
@dubit0 dubit0 deleted the fix-id3-parsing-unicode branch June 14, 2020 18:34
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.

None yet

2 participants