-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NULL is returned in FLAC__StreamMetadata_VorbisComment_Entry->entry #48
Comments
Would you be able to upload an example file here? Or somewhere else and provide a link? Also, can the flac command line program decode this file correctly? |
I just sent you an e-mail with an attached file.
Apparently not, I get
Also with mpv:
(but the audio still plays fine) So, there’s apparently a bug in the encoder I used to rip (and then FLAC-encode) that song. But the flac API should still (I think) correctly report the error to the user. |
Got the file. Thanks. Will have a look some time soon. |
@louiz Do you still have that file? Erik is no longer actively involved with this project, and I would like to try and fix this. |
I’m sorry, it’s been 4 years and I can’t find this file (I have it in mp3, but not in FLAC, for some reason). |
Ok, no problem, thanks for checking. I can make sure this behavior is eliminated through the metadata fuzzer (as soon as it works correctly), that just takes a little longer. |
It seems the problem might be here: flac/src/libFLAC/metadata_iterators.c Lines 2322 to 2333 in 5186025
This might be fixed by simply returning an entry with an empty string instead of nothing at all. It seems this was an oversight in commit def597e |
This might fix xiph#48 I cannot check as I don't have a file to test with. Besides returning an empty string upon reading, also allocate empty strings when growing vorbiscomments
This might fix xiph#48 I cannot check as I don't have a file to test with. Besides returning an empty string upon reading, also allocate empty strings when growing vorbiscomments
This might fix #48 I cannot check as I don't have a file to test with. Besides returning an empty string upon reading, also allocate empty strings when growing vorbiscomments
See for more context: MusicPlayerDaemon/MPD#108 (comment)
When decoding some FLAC (I guess, corrupted) file, libflac sets the entry pointer as NULL, while the documentation (https://xiph.org/flac/api/structFLAC____StreamMetadata__VorbisComment__Entry.html) doesn’t say it can.
This causes client applications (here MPD) to segfault, because it doesn’t expect it to be NULL.
Let me know if you want me to send you a file by e-mail that reproduces this issue.
The text was updated successfully, but these errors were encountered: