1
0
Fork 0
forked from len0rd/rockbox

Fix unchecked result skin_parse_tag() exposed by r28480.

It caused the parser to not see that skin parsing failed and to enter an infinite loop.
And as a result it continued to endlessly malloc(). In normal build the skin buffer size limit made it end.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28497 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-11-05 18:46:21 +00:00
parent bf679fa4ac
commit d98f2929e9

View file

@ -144,7 +144,8 @@ static struct skin_element* skin_parse_viewport(const char** document)
/* Parsing out the viewport tag if there is one */
if(check_viewport(cursor))
{
skin_parse_tag(retval, &cursor);
if (!skin_parse_tag(retval, &cursor))
return NULL;
if(*cursor == '\n')
{
cursor++;