xbmc/xbmc — pull request #3255 by ace20022 (2013-09-13 10:48:34+00:00)
Title: [Fix][StringUtils] Prevent infinite loop or crash.

Example:

std::string rep = "1";
StringUtils::Replace(rep,"",""); //infinite loop
StringUtils::Replace(rep,"","1"); //crash std::bad_alloc