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:
parent
697dbdee8f
commit
49d9d742e2
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user