diff options
author | David Sommerseth <davids@redhat.com> | 2009-05-13 11:23:17 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-05-13 11:23:17 +0200 |
commit | ff78802fb52fe6404d12cbde3037371b69d05c03 (patch) | |
tree | 7484fa33070442d2a77b4a82c1e5d37b86e7684c /src | |
parent | baf01ef0ad9635e506171d66c0e7ffa8c8c45ae1 (diff) | |
download | python-dmidecode-ff78802fb52fe6404d12cbde3037371b69d05c03.tar.gz python-dmidecode-ff78802fb52fe6404d12cbde3037371b69d05c03.tar.xz python-dmidecode-ff78802fb52fe6404d12cbde3037371b69d05c03.zip |
Fixed segfault when processing XPATH_NODESET type and the nodeset is NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/dmixml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dmixml.c b/src/dmixml.c index 8228bf3..65f5e07 100644 --- a/src/dmixml.c +++ b/src/dmixml.c @@ -227,7 +227,7 @@ char *dmixml_GetXPathContent(char *buf, size_t buflen, xmlXPathObject *xpo, int break; case XPATH_NODESET: - if( xpo->nodesetval->nodeNr >= (idx+1) ) { + if( (xpo->nodesetval != NULL) && (xpo->nodesetval->nodeNr >= (idx+1)) ) { strncpy(buf, dmixml_GetContent(xpo->nodesetval->nodeTab[idx]), buflen-1); } break; |