Cluster Project branch, master, updated. cluster-2.99.05-19-gf0a2cb5
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".
The branch, master has been updated
via f0a2cb52271835a65abb00b9cf64ce82f6c3cf6e (commit)
from 39d39c61e694e7d7f0869c477392e532e8088a1d (commit)Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit f0a2cb52271835a65abb00b9cf64ce82f6c3cf6e
Author: Fabio M. Di Nitto <[email protected]> Date: Wed Jun 25 11:29:02 2008 +0200
[CONFIG] Fix several bugs in XML parsing implementations
Signed-off-by Fabio M. Di Nitto <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
config/libs/libccsconfdb/libccs.c | 13 ++++++++----- config/plugins/xml/config.c | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-)
config/libs/libccsconfdb/libccs.c +8 -5
@@ -594,8 +594,10 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)if (list && !strcmp (query, previous_query)) xmllistindex++; -else +else { +memset (previous_query,0 ,PATH_MAX ); xmllistindex =0 ; + }memset (realquery,0 ,PATH_MAX +16 );snprintf (realquery,PATH_MAX +16 -1 ,"/objdbmaindoc%s" , query);
@@ -605,13 +607,14 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)if (!obj)return -EINVAL ; -if (obj->nodesetval && (obj->nodesetval->nodeNr >0 ) ) { +if (obj->nodesetval && (obj->nodesetval->nodeNr >0 )) {xmlNodePtr node;int size =0 , nnv =0 ;if (xmllistindex >= obj->nodesetval->nodeNr){ +memset (previous_query,0 ,PATH_MAX ); xmllistindex =0 ; - res =-1 ; + res = -ENODATA ; goto fail; }
@@ -627,7 +630,6 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)if (node->children && node->children->content) size =strlen ((char *)node->children->content) +strlen ((char *)node->name)+2 ; -else size =strlen ((char *)node->name)+2 ;
@@ -657,7 +659,8 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)if (list)strncpy (previous_query, query,PATH_MAX -1 ); - } + }else + res = -EINVAL ; fail:if (obj)
config/plugins/xml/config.c +4 -1
@@ -58,12 +58,15 @@ static char *do_xml_query(xmlXPathContextPtr ctx, char *query, int list) {if (list && !strcmp (query, previous_query)) xmllistindex++; -else +else { +memset (previous_query,0 ,PATH_MAX ); xmllistindex =0 ; + } obj =xmlXPathEvalExpression ((xmlChar *)query, ctx);if (obj && obj->nodesetval && (obj->nodesetval->nodeNr >0 )) {if (xmllistindex >= obj->nodesetval->nodeNr) { +memset (previous_query,0 ,PATH_MAX ); xmllistindex =0 ; goto fail; }
hooks/post-receive
--
Cluster Project