File libxml2-781701.patch of Package libxml2.openSUSE_Leap_42.2_Update

Index: libxml2-2.9.4/valid.c
===================================================================
--- libxml2-2.9.4.orig/valid.c
+++ libxml2-2.9.4/valid.c
@@ -1320,6 +1320,7 @@ xmlSnprintfElementContent(char *buf, int
 		xmlSnprintfElementContent(buf, size, content->c2, 0);
 	    break;
     }
+    if (size - strlen(buf) <= 2) return;
     if (englob)
         strcat(buf, ")");
     switch (content->ocur) {
openSUSE Build Service is sponsored by