diff options
author | William M. Brack <wbrack@src.gnome.org> | 2003-12-29 02:52:11 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2003-12-29 02:52:11 +0000 |
commit | 081719182de3d15e6a438f32fdc3d1ca240a08e8 (patch) | |
tree | e92318bcd8d4b98d7782b1c89a5f31f4e100c907 /xpointer.c | |
parent | b15351e54d29b139f40a32760d635258f586f7a3 (diff) | |
download | android_external_libxml2-081719182de3d15e6a438f32fdc3d1ca240a08e8.tar.gz android_external_libxml2-081719182de3d15e6a438f32fdc3d1ca240a08e8.tar.bz2 android_external_libxml2-081719182de3d15e6a438f32fdc3d1ca240a08e8.zip |
edited a couple of comments in accordance with posting on the mailing list
* xmlschemas.c: edited a couple of comments in accordance with
posting on the mailing list (no logic change)
* xpointer.c: working on Bug 129967, added check for NULL
nodeset to prevent crash. Further work required.
* xpath.c: working on Bug 129967, added code to handle
XPATH_LOCATIONSET in RANGETO code, also added code to
handle it in xmlXPathEvaluatePredicateResult. Further
work required.
Diffstat (limited to 'xpointer.c')
-rw-r--r-- | xpointer.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2771,6 +2771,10 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { XP_ERROR(XPATH_INVALID_TYPE) set = valuePop(ctxt); + newset = xmlXPtrLocationSetCreate(NULL); + if (set->nodesetval == NULL) { + goto error; + } if (set->type == XPATH_NODESET) { xmlXPathObjectPtr tmp; @@ -2787,7 +2791,6 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { * The loop is to search for each element in the location set * the list of location set corresponding to that search */ - newset = xmlXPtrLocationSetCreate(NULL); for (i = 0;i < oldset->locNr;i++) { #ifdef DEBUG_RANGES xmlXPathDebugDumpObject(stdout, oldset->locTab[i], 0); @@ -2851,6 +2854,7 @@ xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { /* * Save the new value and cleanup */ +error: valuePush(ctxt, xmlXPtrWrapLocationSet(newset)); xmlXPathFreeObject(set); xmlXPathFreeObject(string); |