Bugzilla – Bug 16613
COVERART b64 support broken with new 7.6 scanner code
Last modified: 2011-05-12 15:50:51 UTC
Sometime between SVNs 30996 and 31431, the scanner code was changed such that support for b64 encoded COVERART tagged embedded jpgs in FLACs was broken. Example file: ScanKiller02.zip uploaded to hybridized.org and also to: http://www.hegardtfoundation.org/slimstuff/ScanKiller02.zip This bug appears to be a blocker for libraries which contain such files as they appear to crash the scanner. Full scans of libraries with such files now never complete. Background: Encoding a jpg as b64 text and then embedding that data as a vorbis tag named COVERART was an early attempt at embedding artwork in flac files. The slimserver scanner supported this format long before Josh Coalson extended the flac format (and metaflac) to formally support embedded artwork. Request: Since these COVERART tags are an old and obsolete method of embedding artwork, perhaps full support for this format in the SBS scanner is no longer necessary. However, the scanner code should be fixed so that the scanner at least does not crash when encountering such data. Perhaps the scanner code could be simply modified so as to ignore COVERART tags completely.
This doesn't crash for me. It doesn't read the COVERART tag correctly because your base64 data is full of CRLF newlines. So that's not a bug, you will need to fix the tag.
The real questions should be these: Does artwork that scanned under previous SBS versions suddenly not scan because of recent code changes? Yes, they no longer scan. This has been demonstrated. Is this a change in behavior on SBS's part? Yes it is, as demonstrated above. Do standard windows / dos utilities produce b64 encoded data with CR/LF line endings. Yes they do. Do standard utilities have any trouble decoding the b64 data where the current SBS fails to do so? No, Winzip (amongst many others) easily decodes the data. Bottom line: BUG. Does this need to be fixed in the SBS code? I guess not. I've already expended the effort to search through 4,382 flac files and remove every instance of b64 encoded coverart that I found and replace it with the newer flac-sanctioned PICTURE metadata.
Winzip reads base64 tags in FLAC files? Anyway I'm probably not going to fix this, as any tool I looked at that writes base64 COVERART did not add CRLF.
The standard windows/dos command line b64 encoder, b64.exe, terminates lines with CR/LF. E.g.: b64.exe -e test.jpg test.jpg.b64 ..produces a file with CR/LF line endings.
Sure but users aren't expected to manually base64-encode their cover art, it's usually done by a tagging tool like mp3tag.
Um...I'm a user. Before the flac PICTURE metadata type was supported, my flac encoding scripts always called b64.exe to encode the COVERART tag data. From http://base64.sourceforge.net/b64.c: if( blocksout >= (linesize/4) || feof( infile ) ) { if( blocksout ) { fprintf( outfile, "\r\n" ); } blocksout = 0; } CR/LF is hard-coded right in the utility. The outfile is opened via: outfile = fopen( outfilename, "wb" );
PS: I'm not defending the coding practice shown above. And I'm not lobbying for a fix for this. All I'm saying is that b64 data encoded that way used to work just fine with earlier versions of SBS.
OK, so 1 user was affected, and you already fixed the problem. :) So probably not worth fixing.
Um...more like 10 users, on 3 different continents. ;)
No fix planned, lowering priority and severity.