Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 2 Mar 2022 14:20:15 -0600 (CST)
From: Ariadne Conill <ariadne@...eferenced.org>
To: musl@...ts.openwall.com
cc: psykose <alice@...ya.dev>, Ariadne Conill <ariadne@...eferenced.org>
Subject: Re: [PATCH] abort transaction lookup if NULL is passed as
 msgid1

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@...eferenced.org>

I can confirm I did in fact review this.

Acked-by: Ariadne Conill <ariadne@...eferenced.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
>
>

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.