From aab6515c52aebd5532ba6d5326196395928d39ba Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 2 Nov 2004 02:44:11 +0000 Subject: patches for 0.11.5 bug fix from the following revision changes: 1993 2000 2001 2026 2028 2038 2078 2116 2163 2164 2230 2236 2270 2337 2339 2420 2426 git-svn-id: https://svn.musicpd.org/mpd/branches/branch-0.11.4-fixes@2461 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/metadataChunk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/metadataChunk.c') diff --git a/src/metadataChunk.c b/src/metadataChunk.c index 49cba9d90..84817eb0e 100644 --- a/src/metadataChunk.c +++ b/src/metadataChunk.c @@ -38,7 +38,7 @@ void initMetadataChunk(MetadataChunk * chunk) { MpdTag * metadataChunkToMpdTagDup(MetadataChunk * chunk) { MpdTag * ret = newMpdTag(); - chunk->buffer[METADATA_BUFFER_LENGTH] = '\0'; + chunk->buffer[METADATA_BUFFER_LENGTH-1] = '\0'; dupElementToTag(ret->name, chunk->name); dupElementToTag(ret->title, chunk->title); @@ -65,6 +65,8 @@ void copyMpdTagToMetadataChunk(MpdTag * tag, MetadataChunk * chunk) { initMetadataChunk(chunk); + if(!tag) return; + copyStringToChunk(tag->name, chunk->name); copyStringToChunk(tag->title, chunk->title); copyStringToChunk(tag->artist, chunk->artist); -- cgit v1.2.3