diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-08-03 22:09:34 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-08-05 10:38:18 +0000 |
commit | 848633f921e85b6b298b1c949c17aea56b0af86a (patch) | |
tree | 9daf2acc3cf4070a6fe4ac91ef482d693a38cabd | |
parent | 03a6eb63f1ad6c94aa693bf7d5c766b25072c5ef (diff) |
lib/skin_parser check that malloc succeeded
Change-Id: I32db233a53b0f693f815cf96bcbe6711c366e5b3
-rw-r--r-- | lib/skin_parser/skin_parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index 1d784f918a..0610561699 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c @@ -778,6 +778,11 @@ static int skin_parse_tag(struct skin_element* element, const char** document) else if (tolower(type_code) == 't') { struct skin_element* child = skin_alloc_element(); + if (!child) + { + skin_error(MEMORY_LIMIT_EXCEEDED, cursor); + return 0; + } child->type = TAG; if (!skin_parse_tag(child, &cursor)) return 0; |