[xml] Patch for bug in encoding.c when creating new encoding handlers in 2.2.1

Date view Thread view Subject view Author view

From: marcus@levonline.com
Date: Mon Jul 31 2000 - 04:00:31 EDT


The iconv_in and iconv_out fields is not reset to NULL when creating a new
handler, which makes the free function trying to free up these handlers
although it is not an ICONV handler. This produces a segfault, if these
fields are not NULL already.

The patch below fixes this problem.

/Marcus

--- encoding_old.c Mon Jul 31 09:50:30 2000
+++ encoding.c Mon Jul 31 09:50:31 2000
@@ -1104,6 +1104,9 @@
     handler->output = output;
     handler->name = up;
 
+ handler->iconv_in = NULL;
+ handler->iconv_out = NULL;
+
     /*
      * registers and returns the handler.
      */

----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:24 EDT