From: Christoph Reiter <reiter.christoph@gmail.com>
To: cygwin@cygwin.com
Subject: wmemset() regression with 3.4.2
Date: Thu, 15 Dec 2022 20:04:06 +0100 [thread overview]
Message-ID: <CAE6_+Udw=1dK20fsF34PagXRXV9uhqU_d82mOn68oQR5a9duWQ@mail.gmail.com> (raw)
The following example works with 3.3.6, but fails with 3.4.2. It's a
reduced example from pacman which started to produce garbage output in
some places after upgrading to 3.4.2. While I noticed it in MSYS2
first, I have confirmed it with 3.3.6 and 3.4.2 in cygwin.
```
#include <wchar.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
char dest[50] = { 0 };
wchar_t src[] = L"example";
wmemset(src, L'E', 1);
if (wcstombs(dest, src, 7) == -1) {
printf("FAILED\n");
return 1;
}
printf("OK: %s\n", dest);
return 0;
}
```
thanks
next reply other threads:[~2022-12-15 19:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 19:04 Christoph Reiter [this message]
2022-12-15 19:55 ` Christoph Reiter
2022-12-16 13:20 ` Jon Turney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE6_+Udw=1dK20fsF34PagXRXV9uhqU_d82mOn68oQR5a9duWQ@mail.gmail.com' \
--to=reiter.christoph@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).