fixes potential read off the end of array, thanks to night199uk
authorJonathan Marshall <jmarshall@never.you.mind>
Sun, 8 Jul 2012 20:32:46 +0000 (08:32 +1200)
committerJonathan Marshall <jmarshall@never.you.mind>
Sun, 8 Jul 2012 20:37:39 +0000 (08:37 +1200)
xbmc/music/infoscanner/MusicInfoScanner.cpp

index c2ac7d7..fdfc053 100644 (file)
@@ -687,7 +687,7 @@ void CMusicInfoScanner::CategoriseAlbums(VECSONGS &songsToCheck, VECALBUMS &albu
       {
         unsigned int match = 0;
         vector<string> &compare = (*k)->albumArtist.empty() ? (*k)->artist : (*k)->albumArtist;
-        for (; match < common.size(), match < compare.size(); match++)
+        for (; match < common.size() && match < compare.size(); match++)
         {
           if (compare[match] != common[match])
             break;