From d98f2929e9c07505056d846d1d309f1e16694ce7 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 5 Nov 2010 18:46:21 +0000 Subject: 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 --- lib/skin_parser/skin_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/skin_parser') diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index 5a5d746c8e..80f5f61699 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c @@ -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++; -- cgit v1.2.3