* Fix up bad accesses found by valgrind.

This commit is contained in:
Justin Maggard
2012-11-06 08:24:37 +00:00
parent fa37df8b1f
commit 035fd35ffd
2 changed files with 9 additions and 7 deletions

View File

@ -204,7 +204,7 @@ _get_wavtags(char *filename, struct song_metadata *psong)
p += taglen + 8;
off += taglen + 8;
/* Handle some common WAV file malformations */
while (*p == '\0') {
while (*p == '\0' && off < len) {
p++;
off++;
}