1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

autogenerate a minimal NULL value sequence for unknown pointer types This

* gentest.py testapi.c: autogenerate a minimal NULL value sequence
  for unknown pointer types
* HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c
  parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c
  xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c
  xpointer.c: This uncovered an impressive amount of entry points
  not checking for NULL pointers when they ought to, closing all
  the open gaps.
Daniel
This commit is contained in:
Daniel Veillard
2004-11-05 17:22:25 +00:00
parent b031cef5b5
commit ce682bc24b
20 changed files with 4886 additions and 539 deletions

View File

@@ -642,7 +642,7 @@ void
xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
int i;
if (val == NULL) return;
if ((cur == NULL) || (val == NULL)) return;
/*
* check against doublons
@@ -2227,6 +2227,7 @@ xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlNodeSetPtr oldset;
int i;
if (ctxt == NULL) return;
CHECK_ARITY(1);
/*
* Save the expression pointer since we will have to evaluate
@@ -2904,6 +2905,8 @@ xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) {
xmlLocationSetPtr oldset;
int i;
if (ctxt == NULL) return;
SKIP_BLANKS;
if (CUR != '[') {
XP_ERROR(XPATH_INVALID_PREDICATE_ERROR);