[NetworkManager-openconnect] Fix crash on XML parse failure
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-openconnect] Fix crash on XML parse failure
- Date: Tue, 16 Oct 2018 16:55:36 +0000 (UTC)
commit ad09947da5e91a57fba461068636a44ea487ab0c
Author: David Woodhouse <dwmw2 infradead org>
Date: Tue Oct 16 09:55:01 2018 -0700
Fix crash on XML parse failure
auth-dialog/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 65b55e6..d87f39b 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -956,7 +956,8 @@ static int parse_xmlconfig(gchar *xmlconfig)
}
xml_doc = xmlReadMemory(xmlconfig, strlen(xmlconfig), "noname.xml", NULL, 0);
-
+ if (!xml_doc)
+ return -EIO;
xml_node = xmlDocGetRootElement(xml_doc);
for (xml_node = xml_node->children; xml_node; xml_node = xml_node->next) {
if (xml_node->type == XML_ELEMENT_NODE &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]