[Reconnoiter-devel] [reconnoiter commit] r1318 - trunk/src

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Thu May 27 13:40:48 EDT 2010


Author: jesus
Date: 2010-05-27 13:40:47 -0400 (Thu, 27 May 2010)
New Revision: 1318

Modified:
   trunk/src/noit_conf.c
Log:
refs #284

Modified: trunk/src/noit_conf.c
===================================================================
--- trunk/src/noit_conf.c	2010-05-27 17:38:06 UTC (rev 1317)
+++ trunk/src/noit_conf.c	2010-05-27 17:40:47 UTC (rev 1318)
@@ -411,7 +411,7 @@
    */
   node = xmlXPathNodeSetItem(pobj->nodesetval, cnt-1);
   /* 1. */
-  if(cnt > 1) {
+  if(cnt > 1 && node) {
     parent_node = xmlXPathNodeSetItem(pobj->nodesetval, cnt-2);
     if(parent_node != current_node)
       noit_conf_get_into_hash(parent_node, (const char *)node->name, table);
@@ -1094,7 +1094,7 @@
   }
 
   info = noit_console_userdata_get(ncct, NOIT_CONF_T_USERDATA);
-  if(info) path = basepath = info->path;
+  if(info && info->path) path = basepath = info->path;
   if(!info && argc == 0) {
     nc_printf(ncct, "argument required when not in configuration mode\n");
     return -1;
@@ -1215,6 +1215,10 @@
   }
 
   node = (noit_conf_section_t)xmlXPathNodeSetItem(pobj->nodesetval, 0);
+  if(!node) {
+    err = "internal XML error";
+    goto bad;
+  }
   if(!strcmp((char *)node->name, "check") ||
      !strcmp((char *)node->name, "noit") ||
      !strcmp((char *)node->name, "filterset") ||



More information about the Reconnoiter-devel mailing list