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

more coverage more fixes Daniel

* gentest.py testapi.c: more coverage
* debugXML.c parser.c xmlregexp.c xpath.c: more fixes
Daniel
This commit is contained in:
Daniel Veillard
2004-11-08 16:24:57 +00:00
parent 2a4fb5ac07
commit a82b182655
8 changed files with 6021 additions and 52 deletions

View File

@@ -1420,7 +1420,7 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
*/
xmlChar
xmlPopInput(xmlParserCtxtPtr ctxt) {
if (ctxt->inputNr <= 1) return(0); /* End of main Input */
if ((ctxt == NULL) || (ctxt->inputNr <= 1)) return(0);
if (xmlParserDebugEntities)
xmlGenericError(xmlGenericErrorContext,
"Popping input %d\n", ctxt->inputNr);
@@ -1934,7 +1934,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
int c,l;
int nbchars = 0;
if ((str == NULL) || (len < 0))
if ((ctxt == NULL) || (str == NULL) || (len < 0))
return(NULL);
last = str + len;
@@ -2076,6 +2076,7 @@ mem_error:
xmlChar *
xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what,
xmlChar end, xmlChar end2, xmlChar end3) {
if ((ctxt == NULL) || (str == NULL)) return(NULL);
return(xmlStringLenDecodeEntities(ctxt, str, xmlStrlen(str), what,
end, end2, end3));
}