xbmc/xbmc — pull request #5485 by Montellese (2014-10-10 17:02:19+00:00)
Title: Fix episode NFO scraping

This fixes the problem described in http://trac.xbmc.org/ticket/15472. Basically episode NFO scraping has been completely broken after ca57cc692d86310b4c1f22e01e982c5a256b53ed due to missing range checks before calling std::string::substr().

The old implementation used strstr() which would return NULL in case of no match which then was turned into a CStdString which resulted in an empty string. That was parseable by CXBMCTinyXML.