mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
metadata_object.c : Fix handling of zero length vorbis comment string.
Previously if a zero length string was passed in, the pointer would be stored regardless of the copy parameter. If the original source pointer was reassigned to something else bad things could happen. Closes: https://sourceforge.net/p/flac/bugs/377/
This commit is contained in:
@@ -264,7 +264,7 @@ static FLAC__bool vorbiscomment_set_entry_(FLAC__StreamMetadata *object, FLAC__S
|
||||
|
||||
save = dest->entry;
|
||||
|
||||
if(0 != src->entry && src->length > 0) {
|
||||
if(0 != src->entry) {
|
||||
if(copy) {
|
||||
/* do the copy first so that if we fail we leave the dest object untouched */
|
||||
if(!copy_vcentry_(dest, src))
|
||||
|
||||
Reference in New Issue
Block a user