Index: apps/metadata/id3tags.c =================================================================== --- apps/metadata/id3tags.c (revision 29204) +++ apps/metadata/id3tags.c (working copy) @@ -301,8 +301,7 @@ if ((tag - entry->id3v2buf + desc_len + 2) < bufferpos) { /* At least part of the value was read, so we can safely try to - * parse it - */ + * parse it */ value = tag + desc_len + 1; value_len = bufferpos - (tag - entry->id3v2buf); @@ -311,8 +310,7 @@ entry->albumartist = tag; #if CONFIG_CODEC == SWCODEC } else { - value_len = parse_replaygain(tag, value, entry, tag, - value_len); + value_len = parse_replaygain(tag, value, entry, tag, value_len); #endif } } @@ -963,6 +961,12 @@ if( tr->ppFunc ) bufferpos = tr->ppFunc(entry, tag, bufferpos); + + /* Trim. Take into account that multiple string contents will + * only be displayed up to their first null termination. All + * content after this null termination is obsolete and can be + * overwritten. */ + bufferpos -= (bytesread - strlen(tag)); /* Seek to the next frame */ if(framelen < totframelen)