JamesHeinrich / getID3

http://www.getid3.org/
Other
1.13k stars 245 forks source link

Garbage extracted from a RIFF tag in an AIFF file #430

Closed paulijar closed 6 months ago

paulijar commented 6 months ago

I got a sample of an AIFF file from an end user where the extracted title field contains some garbage bytes after the correct content. Looking closer, this file seems to contain RIFF and ID3V2 tags, and the garbage content comes from the RIFF tag. Looking the file with a hex editor, I can find an instance of the track title which is followed by a null terminator character and the same garbage bytes as shown in the extracted metadata. Hence, this seems to be very similar case as the old issue https://github.com/JamesHeinrich/getID3/issues/263.

@JamesHeinrich I will send you the sample file shortly.

image

image

JamesHeinrich commented 6 months ago

Thanks for the sample file. Fixed (I hope) in https://github.com/JamesHeinrich/getID3/commit/19c9d00abbf126491fe1fe8986d8aeea11a65915 Should now only return the string up to (not including) the first null byte, if any.

I found three places in module.audio-video.riff.php where this fix should be applied, if I missed somewhere please re-open this issue.

paulijar commented 6 months ago

Great, thanks again, and Happy New Year!