Hello.

Mailutils 3.4 and 3.4.91 build fails when it build with new glibc:

189: mhl usenet                 FAILED (mhl.at:49)

I sent testsuite.log to gray@. Ivan A. Melnikov suggested fix
(look to attachment) but he is not convinced that it is right.

-- 
Regards, Sergey
commit 51f10424d329aad87136ef8d7fac2cae3ce766df
Author: Ivan A. Melnikov <i...@altlinux.org>
Date:   Wed Aug 15 16:08:55 2018 +0400

    Force terminating \0 in mh_format result
    
    Apparently, mu_stream_read is not required to put the
    terminating zero into the buffer, so we need to do it
    in its caller.
    
    Signed-off-by: Ivan A. Melnikov <i...@altlinux.org>

diff --git a/mh/mh_format.c b/mh/mh_format.c
index d4aff7f4d..77faaf030 100644
--- a/mh/mh_format.c
+++ b/mh/mh_format.c
@@ -726,6 +726,7 @@ mh_format_str (mh_format_t fmt, char *str, size_t width, char **pstr)
   buf = mu_alloc (size + 1);
   MU_ASSERT (mu_stream_seek (outstr, 0, MU_SEEK_SET, NULL));
   MU_ASSERT (mu_stream_read (outstr, buf, size, NULL));
+  buf[size] = 0;
 
   *pstr = buf;
   
_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-mailutils

Reply via email to