Quicktime atom heirarchy broken

Locked
Dippres
User
Posts: 3
Joined: Tue Jun 25, 2013 8:33 am
Are you a spambot?: no

Quicktime atom heirarchy broken

Post by Dippres » Tue Jun 25, 2013 8:48 am

V1.9.6
php v5.3

The atom heirarchy in module.audio-video.quicktime.php is broken and the atom structure always reports the heirarchy as just the current atom name.

The problem is caused by $atom_parent popping the parent name off the heirarchy stack on line 173, rather than just reading it. If this line is changed to:

Code: Select all

$atom_parent = end($atomHierarchy);
then the heirarchy is reported correctly. It is clearly a problem because the function QuicktimeParseAtom currently has one push and two pops so the stack can never function correctly.

I came across this problem as I had a file with a cprt atom embedded in a udta but the atom_parent was not set correctly so the code tried to handle cprt as an apple item list box. The cprt had an effective boxsize of 0 and the code then entered an endless loop because the atomoffset was not incremented as it tried to read 0 length boxes. I would suggest that a check is done on boxsize to make sure it is not zero to avoid this endless loop.

James Heinrich
getID3() v1 developer
Posts: 1475
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Quicktime atom heirarchy broken

Post by James Heinrich » Tue Jun 25, 2013 12:25 pm

Are you able to provide a sample file that shows this problem, please?

Dippres
User
Posts: 3
Joined: Tue Jun 25, 2013 8:33 am
Are you a spambot?: no

Re: Quicktime atom heirarchy broken

Post by Dippres » Tue Jun 25, 2013 4:58 pm


James Heinrich
getID3() v1 developer
Posts: 1475
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Quicktime atom heirarchy broken

Post by James Heinrich » Tue Jun 25, 2013 6:46 pm

Thanks. I'll accept your fix for $atom_parent and include in v1.9.7

I was unable to replicate your infinite-loop issue, can you provide more specifics as to where you see this problem (in the code, preferably)? Is the sample file you provided affected?

Dippres
User
Posts: 3
Joined: Tue Jun 25, 2013 8:33 am
Are you a spambot?: no

Re: Quicktime atom heirarchy broken

Post by Dippres » Tue Jun 25, 2013 7:39 pm

Sorry, the boxsize fix seems to be in 1.9.6 at line 385. I was running a previous release version (1.9.3) on the server that had the infinite loop problem rather than the latest version I have on my development machines.

Locked