module.audio-video.quicktime.php Unknown Atom Error

Locked
filmo
User
Posts:22
Joined:Fri Dec 08, 2006 7:16 pm
Location:Los Angeles
module.audio-video.quicktime.php Unknown Atom Error

Post by filmo » Tue Aug 16, 2011 7:14 pm

Line 1327 of module.audio-video.quicktime.php

Appears to be designed to report an error if an unknown atom is found.

Unfortunately, $atomname in this circumstance will often contain non-ascii characters, specifically it may contain one or more 0x00 (null characters). Example "Atom0x00name" instead of just "Atomname"

If you then pass the results of the getID3 info between servers using SOAP, you'll end up with a "not well-formed (invalid token)" error in the XML.

My quick and dirty fix was:

Code: Select all

// ORIGINAL CODE
default:
	$info['warning'][] = 'Unknown QuickTime atom type: "'.$atomname.'" at offset '.$baseoffset;
	$atom_structure['data'] = $atom_data;
	break;
changed to:

Code: Select all

// DIRTY FIX
default:
	$info['warning'][] = 'Unknown QuickTime atom type';
	$atom_structure['data'] = $atom_data;
	break;
Seems like the real solution would be to strip out any non-visible ascii-characters from the $atomname??

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

Re: module.audio-video.quicktime.php Unknown Atom Error

Post by James Heinrich » Tue Aug 16, 2011 7:45 pm

My fix for v1.9.2 will actually be to print a hex dump of the characters, since the possible unknown values are typically 4 characters long the hex value is actually probably slightly more useful to me in coding a fix.

Patched version attached -- getid3_lib::PrintHexBytes() added in 3 places.
Attachments
module.audio-video.quicktime.php
(106.25KiB)Downloaded 957 times

Locked