From: He X <xw897002528@gmail.com>
To: musl@lists.openwall.com
Subject: fallback to no translations when gettext("")
Date: Sat, 4 Mar 2017 16:08:18 +0800 [thread overview]
Message-ID: <CAPG2z0-V-7HD=+TA9zgwHQaVCpf_AHmiU0TBQ0we6iC=woeyFw@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 475 bytes --]
following http://www.openwall.com/lists/musl/2017/02/13/8 ,
http://www.openwall.com/lists/musl/2017/03/04/1 and
http://www.openwall.com/lists/musl/2017/02/13/5:
> gnu tar showed me segfaults, because he passed a zero msgid1 causing
__mo_lookup segfault, we should add a check in dcngettext to avoid it(if
(!msgid1) goto notrans;):
#2 0x00007ffff7d82a6f in dcngettext (domainname=0x6737a0 "tar",
msgid1=0x0, msgid2=0x0, n=1,
category=5) at src/locale/dcngettext.c:211
[-- Attachment #1.2: Type: text/html, Size: 795 bytes --]
[-- Attachment #2: locale.diff --]
[-- Type: text/plain, Size: 461 bytes --]
--- musl-1.1.16/src/locale/dcngettext.c 2017-03-04 08:05:45.755115338 +0000
+++ musl-1.1.16/src/locale/dcngettext.c 2017-03-04 08:05:45.755115338 +0000
@@ -121,6 +121,7 @@
char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, int category)
{
+ if (!msgid1) goto notrans;
static struct msgcat *volatile cats;
struct msgcat *p;
struct __locale_struct *loc = CURRENT_LOCALE;
const struct __locale_map *lm;
next reply other threads:[~2017-03-04 8:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-04 8:08 He X [this message]
2017-03-23 5:05 ` He X
2017-03-24 18:36 ` Rich Felker
2017-03-25 2:36 ` He X
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='CAPG2z0-V-7HD=+TA9zgwHQaVCpf_AHmiU0TBQ0we6iC=woeyFw@mail.gmail.com' \
--to=xw897002528@gmail.com \
--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).