From 36e5cd5064d3477a0500f6183d68b18b7493568a Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 2 Nov 2004 14:52:23 +0000 Subject: adding xmlMemBlocks() work on generator of an automatic API regression * xmlmemory.c include/libxml/xmlmemory.h: adding xmlMemBlocks() * Makefile.am gentest.py testapi.c: work on generator of an automatic API regression test tool. * SAX2.c nanoftp.c parser.c parserInternals.c tree.c xmlIO.c xmlstring.c: various API hardeing changes as a result of running teh first set of automatic API regression tests. * test/slashdot16.xml: apparently missing from CVS, commited it Daniel --- xmlstring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xmlstring.c') diff --git a/xmlstring.c b/xmlstring.c index af4e5c81..15ca76c8 100644 --- a/xmlstring.c +++ b/xmlstring.c @@ -807,7 +807,6 @@ xmlCheckUTF8(const unsigned char *utf) * * Returns the storage size of * the first 'len' characters of ARRAY - * */ int @@ -815,6 +814,9 @@ xmlUTF8Strsize(const xmlChar *utf, int len) { const xmlChar *ptr=utf; xmlChar ch; + if (utf == NULL) + return(0); + if (len <= 0) return(0); -- cgit v1.2.3