$NetBSD: patch-ah,v 1.6 2009/04/07 16:27:08 drochner Exp $

--- src/af/util/xp/ut_mbtowc.cpp.orig	2009-03-12 14:54:05.000000000 +0100
+++ src/af/util/xp/ut_mbtowc.cpp
@@ -179,11 +179,11 @@ int UT_UCS4_mbtowc::mbtowc (UT_UCS4Char 
   const char * inptr = m_buf;
 
   // need eight bytes in order for the hack below to work (see below)
-  UT_UCS4Char ucs4[2];
+  UT_UCS4Char ucs4[5];
   char * outptr = reinterpret_cast<char *>(&ucs4);
 
   size_t inlen = m_bufLen;
-  size_t outlen = sizeof (ucs4[0]);
+  size_t outlen = 4 * sizeof (ucs4[0]);
 
   const UT_iconv_t cd = m_converter->cd ();
 
