Permalink
Browse files

fixed: validate destination buffer. thanks to pantaloonix

  • Loading branch information...
1 parent 542ae99 commit 868401c117b8f6e140522101afcddb9502f7f803 spiff committed Jan 26, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 xbmc/utils/ScraperParser.cpp
@@ -363,7 +363,13 @@ void CScraperParser::ParseNext(TiXmlElement* element)
}
if (bExecute)
- ParseExpression(strInput, m_param[iDest-1],pReg,bAppend);
+ {
+ if (iDest-1 < MAX_SCRAPER_BUFFERS && iDest-1 > -1)
+ ParseExpression(strInput, m_param[iDest-1],pReg,bAppend);
+ else
+ CLog::Log(LOGERROR,"CScraperParser::ParseNext: destination buffer "
+ "out of bounds, skipping expression");
+ }
pReg = pReg->NextSiblingElement("RegExp");
}

0 comments on commit 868401c

Please sign in to comment.