bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: argp: pass NULL as msgid to dgettext without checks


From: Bruno Haible
Subject: Re: argp: pass NULL as msgid to dgettext without checks
Date: Sat, 05 Jan 2019 13:46:12 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Hi,

He X wrote on 2018-12-22:
> according to
> https://www.gnu.org/software/gettext/manual/html_node/Interface-to-gettext.html,
> passing NULL to gettext is undefined.

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

> since my libc is musl, tar is using builtin argp implementation, which will
> pass NULL as msgid to dgettext without additional checks.
> 
> 
> could you please check if msgid is NULL before passing it to dgettext? the
> problem code is located at argp-help.c.

I don't see which dgettext invocation in argp-help.c is the one that needs the
NULL check. Can you please provide a stack trace (from gdb, from a 'tar' program
built with CFLAGS="-ggdb") of the crash?

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]