[i686] [GNU Mailutils 3.4.91] testsuite: 189 failed with glibc 2.26/2.27
Sergey <[email protected]>
| Newsgroups | gmane.comp.gnu.mailutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ Bug-mailutils mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-mailutils
mailutils-3.4-alt-fix-mh-format.patch
(text/x-diff, 776 B)
commit 51f10424d329aad87136ef8d7fac2cae3ce766df Author: Ivan A. Melnikov <[email protected]> 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 <[email protected]> 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;