From: Craig Small Date: Tue, 2 Nov 2021 06:19:37 +0000 (+1100) Subject: pgrep: Fix format security X-Git-Tag: v4.0.0~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e0e865ca5f8252b84571b23bb7be0fa76faacfb;p=procps-ng pgrep: Fix format security do_regcomp() error message didn't use a string literal for the format string. pgrep.c:538:24: error: format not a string literal and no format arguments [-Werror=format-security] Signed-off-by: Craig Small --- diff --git a/pgrep.c b/pgrep.c index 6457fd40..cbcb4cb1 100644 --- a/pgrep.c +++ b/pgrep.c @@ -534,7 +534,7 @@ static regex_t * do_regcomp (void) if (re_err) { regerror (re_err, preg, errbuf, sizeof(errbuf)); - xerrx(EXIT_USAGE, errbuf); + xerrx(EXIT_USAGE, _("regex error: %s"), errbuf); } } return preg;