From: Ariadne Conill <ariadne@dereferenced.org>
To: musl@lists.openwall.com
Cc: psykose <alice@ayaya.dev>, Ariadne Conill <ariadne@dereferenced.org>
Subject: Re: [musl] [PATCH] abort transaction lookup if NULL is passed as msgid1
Date: Wed, 2 Mar 2022 14:20:15 -0600 (CST) [thread overview]
Message-ID: <cb4926e9-243-1dba-9110-2b62bb7b406a@dereferenced.org> (raw)
In-Reply-To: <20220302201654.98472-1-alice@ayaya.dev>
Hi,
On Wed, 2 Mar 2022, psykose wrote:
> When investigating a crash in Transmission running under musl's gettext
> implementation, we observed that GNU libintl returns NULL when NULL is
> passed as the msgid1. Accordingly, make the musl gettext behavior match
> GNU libintl.
>
> Reviewed-by: Ariadne Conill <ariadne@dereferenced.org>
I can confirm I did in fact review this.
Acked-by: Ariadne Conill <ariadne@dereferenced.org>
> ---
> src/locale/dcngettext.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/locale/dcngettext.c b/src/locale/dcngettext.c
> index d1e6c6d1..0b53286d 100644
> --- a/src/locale/dcngettext.c
> +++ b/src/locale/dcngettext.c
> @@ -132,6 +132,9 @@ char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2,
> struct binding *q;
> int old_errno = errno;
>
> + /* match gnu gettext behaviour */
> + if (!msgid1) goto notrans;
> +
> if ((unsigned)category >= LC_ALL) goto notrans;
>
> if (!domainname) domainname = __gettextdomain();
> --
> 2.35.1
>
>
next prev parent reply other threads:[~2022-03-02 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 20:16 psykose
2022-03-02 20:20 ` Ariadne Conill [this message]
2022-03-02 22:07 ` Quentin Rameau
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=cb4926e9-243-1dba-9110-2b62bb7b406a@dereferenced.org \
--to=ariadne@dereferenced.org \
--cc=alice@ayaya.dev \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).