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

> 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?


Reply via email to