Index: apps/metadata/id3tags.c =================================================================== --- apps/metadata/id3tags.c (revision 30489) +++ apps/metadata/id3tags.c (working copy) @@ -579,7 +579,7 @@ if(str[1] == 0) le = true; - do { + while ((i < *len) && (str[0] || str[1])) { if(le) utf8 = utf16LEdecode(str, utf8, 1); else @@ -587,7 +587,7 @@ str+=2; i += 2; - } while((str[0] || str[1]) && (i < *len)); + } *utf8++ = 0; /* Terminate the string */ templen += (strlen(&utf8buf[templen]) + 1); @@ -992,6 +992,10 @@ if(bytesread >= buffersize - bufferpos) bytesread = buffersize - bufferpos - 1; + if (bytesread == 0) + /* Ignore frames with completely empty strings */ + continue; + for (j = 0; j < bytesread; j++) tag[j] = utf8buf[j];