added a check within xmlOutputBufferWriteEscape to prevent a dead loop on

* xmlIO.c: added a check within xmlOutputBufferWriteEscape to prevent
  a dead loop on bad data (bug 159550)
diff --git a/xmlIO.c b/xmlIO.c
index 1ca80c9..83fb242 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -3084,7 +3084,7 @@
 	    }
 	    ret = escaping(out->buffer->content + out->buffer->use ,
 	                   &chunk, str, &cons);
-	    if (ret < 0)
+	    if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
 	        return(-1);
 	    out->buffer->use += chunk;
 	    out->buffer->content[out->buffer->use] = 0;
@@ -3105,7 +3105,7 @@
 	} else {
 	    ret = escaping(out->buffer->content + out->buffer->use ,
 	                   &chunk, str, &cons);
-	    if (ret < 0)
+	    if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
 	        return(-1);
 	    out->buffer->use += chunk;
 	    out->buffer->content[out->buffer->use] = 0;