Skip to content

Commit

Permalink
xml/nolibxml: better handle parsing failure at the beginning of XML d…
Browse files Browse the repository at this point in the history
…iffs

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Sep 12, 2018
1 parent 43d700b commit 577f7fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hwloc/topology-xml-nolibxml.c
Expand Up @@ -502,7 +502,7 @@ hwloc_nolibxml_import_diff(struct hwloc__xml_import_state_s *state,
ret = hwloc__nolibxml_import_find_child(state, &childstate, &tag);
if (ret < 0)
goto out_with_buffer;
if (strcmp(tag, "topologydiff"))
if (!tag || strcmp(tag, "topologydiff"))
goto out_with_buffer;

while (1) {
Expand Down

0 comments on commit 577f7fd

Please sign in to comment.