diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-21 21:43:38 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-21 21:53:53 -0700 |
commit | 66375689b8cd110355656203979f5640ecf05193 (patch) | |
tree | 41cae26b0af6e11a95adf0887504fc2755f19694 /parse-xml.c | |
parent | 18d52ec86efcc4e42f2bad0fc47ac1a3d5b69435 (diff) | |
download | subsurface-66375689b8cd110355656203979f5640ecf05193.tar.gz |
Prevent null dereference
In each case there are scenarios where we would have dereferenced NULL.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c index 9b5f97e21..45ac984df 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1762,7 +1762,7 @@ static const char *nodename(xmlNode *node, char *buf, int len) int levels = 2; char *p = buf; - if (node->type != XML_CDATA_SECTION_NODE && (!node || !node->name)) { + if (!node || (node->type != XML_CDATA_SECTION_NODE && !node->name)) { return "root"; } |