[libxml2] 630140 fix iso995x encoding error



commit 083caf5ec8045bfec5f9aca62c6f02dd0007dc92
Author: Daniel Veillard <veillard redhat com>
Date:   Wed Nov 3 19:24:05 2010 +0100

    630140 fix iso995x encoding error
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630140
    Fix the bug, which happen when using the embedded converters and
    not iconv

 encoding.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/encoding.c b/encoding.c
index b86a547..a76e9d5 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2039,7 +2039,11 @@ retry:
 	    xmlBufferShrink(in, toconv);
 	    out->use += written;
 	    writtentot += written;
-	} 
+            /* multichar cut at end of buffer can generate that problem */
+            if (ret == -2) {
+                ret = -3;
+            }
+	}
 	out->content[out->use] = 0;
     }
 #ifdef LIBXML_ICONV_ENABLED



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]