benrr101 / node-taglib-sharp

A node.js port of mono/taglib-sharp
GNU Lesser General Public License v2.1
34 stars 9 forks source link

Fixing GEOB Latin1 Encoding Bug #96

Closed benrr101 closed 6 months ago

benrr101 commented 6 months ago

Description: Fixing a bug likely introduced when doing the bytevector refactoring. Discovered when trying to mess around with one of my files that contained an (unknown to me) GEOB frame. The GEOB frame contained a cue points table, likely stored by rekordcloud. The frame was encoded in Latin1 encoding, which means the GEOB frame starts with 0x00. The attachment frame parser starts by looking for 0x00 to determine the end of the mime type. If the frame is encoded in Latin1, the parser will think the mime type is 0 bytes long, leading to a failure. The fix is to introduce an offset in searching for mime type delimiter.

Testing: