From 2e0e865ca5f8252b84571b23bb7be0fa76faacfb Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 2 Nov 2021 17:19:37 +1100 Subject: [PATCH] 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 --- pgrep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.40.0