Commit 49d9d742 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

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.

parent 697dbdee
......@@ -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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment