From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14275 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.comp.gnu.gettext.bugs,gmane.linux.lib.musl.general Subject: Re: gettext API question - null pointer issue again Date: Thu, 27 Jun 2019 09:58:37 +0200 Message-ID: <2467189.3HMQpSEUky@omega> References: <20190627041820.GA29896@brightrain.aerifal.cx> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="4415"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) Cc: musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org, bug-gettext-mXXj517/zsQ@public.gmane.org To: Rich Felker Original-X-From: bug-gettext-bounces+gcggb-bug-gettext=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Jun 27 09:59:00 2019 Return-path: Envelope-to: gcggb-bug-gettext@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgPJ0-0000tY-GG for gcggb-bug-gettext@m.gmane.org; Thu, 27 Jun 2019 09:58:56 +0200 Original-Received: from localhost ([::1]:47446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgPIz-00055F-G2 for gcggb-bug-gettext@m.gmane.org; Thu, 27 Jun 2019 03:58:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39001) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgPIu-00054q-IH for bug-gettext-mXXj517/zsQ@public.gmane.org; Thu, 27 Jun 2019 03:58:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgPIt-0004qE-DO for bug-gettext-mXXj517/zsQ@public.gmane.org; Thu, 27 Jun 2019 03:58:48 -0400 Original-Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::10]:34112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgPIs-0004mC-EI for bug-gettext-mXXj517/zsQ@public.gmane.org; Thu, 27 Jun 2019 03:58:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1561622322; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=ljzpPfAfE6Ppl2I0QQabWIGDL5v5LREUZb6aSsDNxFk=; b=GrIIHd6fDj2CBu6ovLHn1YL05KBNWi041Un7mKWFB0E2D1ipbP+I5OXuFtBFYRG6zn gD0WH+Z+ACfmEZVWdvqavoeIa0DisbNglVEaL23RV+LLR7LiCu6aEUqCYdEmCBNZWHLH tstnxTvi+X1Kzu2N65HTNudqquLr1qZ0Oy0EyaohCtiYhADsi7yYWrAlEP8UsevNqnCH 7q5plRaCWqEzVjvPPZ3nDoREAAOlucqhsYzPaNLQmPqHLe6WMmZIIWKXsbDGafxwlRG0 N6pyzPPiBGRVZOdVl0eGiNQBFscKl0Vj/OYdxUIlEBN7v8reS3eNW8RHpor/ukumDSyC QvdQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW" X-RZG-CLASS-ID: mo00 Original-Received: from bruno.haible.de by smtp.strato.de (RZmta 44.24 DYNA|AUTH) with ESMTPSA id v018bcv5R7wbXn6 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 27 Jun 2019 09:58:37 +0200 (CEST) In-Reply-To: <20190627041820.GA29896-C3MtFaGISjmo6RMmaWD+6Sb1p8zYI1N1@public.gmane.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::10 X-BeenThere: bug-gettext-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for GNU gettext List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gettext-bounces+gcggb-bug-gettext=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: "bug-gettext" Xref: news.gmane.org gmane.comp.gnu.gettext.bugs:2235 gmane.linux.lib.musl.general:14275 Archived-At: [CCing bug-gettext] Rich Felker wrote in : > Could you answer a question about the gettext API that's come up again > in the context of musl's implementation? The gettext manual documents > that for the message key argument to these functions: > > "If the argument is NULL the result is undefined." > > https://www.gnu.org/software/gettext/manual/html_node/Interface-to-gettext.html Likewise the LI18NUX 2000 specification (p. 39) says "The msgid argument is a null-terminated string." And likewise the LSB 3.0 https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/baselib-dgettext.html And likewise the Solaris implementation's documentation says: "The msgid argument is a null-terminated string." https://docs.oracle.com/cd/E88353_01/html/E37843/gettext-3c.html#REFMAN3Agettext-3c > And it looks like you've treated passing a null argument as a bug in > the past: > > https://www.mail-archive.com/bug-gnulib-mXXj517/zsQ@public.gmane.org/msg36249.html https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00046.html Yes. > It's come up again with GIMP doing it: > > https://github.com/void-linux/void-packages/issues/12042 > > Should we continue to treat this as an application bug and ask the app > maintainers to fix it when it's found? Yes. Bruno