extending the tests coverage more fixes and cleanups Daniel
* gentest.py testapi.c: extending the tests coverage
* HTMLtree.c tree.c xmlsave.c xpointer.c: more fixes and cleanups
Daniel
diff --git a/tree.c b/tree.c
index dd9588e..046c896 100644
--- a/tree.c
+++ b/tree.c
@@ -6709,6 +6709,7 @@
*/
int
xmlBufferShrink(xmlBufferPtr buf, unsigned int len) {
+ if (buf == NULL) return(-1);
if (len == 0) return(0);
if (len > buf->use) return(-1);
@@ -6736,6 +6737,8 @@
int size;
xmlChar *newbuf;
+ if (buf == NULL) return(-1);
+
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (len + buf->use < buf->size) return(0);