Endless repetition in getid3_id3v2::ParseID3v2GenreString()

Think you found a bug in getID3()? Post here with details.

Endless repetition in getid3_id3v2::ParseID3v2GenreString()

Postby naitsirch » Mon Mar 29, 2010 4:08 am

Hi.
We have a problem in the Method getid3_id3v2::ParseID3v2GenreString() in file module.tag.id3v2.php. If no ID3v1 genre is given and the genre in ID3v2 is something like "Dance Music (Bacalao" for example will lead to an endless repeatition of the while loop because there is no closing bracket in the genre.

The result was the following error message:
Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to allocate 92274698 bytes) in /var/www/docroot/includes/getid3/getid3/module.tag.id3v2.php on line 483

I hope this will help to fix the bug.

Best regards
_________
Christian Stoller - Leonex Internet GmbH
naitsirch
User
 
Posts: 3
Joined: Wed Aug 19, 2009 1:43 am

Re: Endless repetition in getid3_id3v2::ParseID3v2GenreString()

Postby naitsirch » Mon Mar 29, 2010 4:52 am

Hi.
I have fixed the problem now by editing line 474
Code: Select all
- while (strpos($genrestring, '(') !== false)

Code: Select all
+ while (strpos($genrestring, '(') !== false && strpos($genrestring, ')') !== false )

But I have not tested if the genre is read out correctly now.
_________
Christian Stoller - Leonex Internet GmbH
naitsirch
User
 
Posts: 3
Joined: Wed Aug 19, 2009 1:43 am


Return to Bug Reports

Who is online

Users browsing this forum: Google [Bot] and 1 guest