about summary refs log tree commit diff
path: root/wcsmbs/wcrtomb.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wcrtomb.c')
-rw-r--r--wcsmbs/wcrtomb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wcsmbs/wcrtomb.c b/wcsmbs/wcrtomb.c
index f0bc824584..375a000072 100644
--- a/wcsmbs/wcrtomb.c
+++ b/wcsmbs/wcrtomb.c
@@ -49,6 +49,7 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps ?: &state;
+  memset (&data.__trans, '\0', sizeof (struct __gconv_trans_data));
 
   /* A first special case is if S is NULL.  This means put PS in the
      initial state.  */