summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Small <csmall@dropbear.xyz>2021-11-02 17:19:37 +1100
committerCraig Small <csmall@dropbear.xyz>2021-11-02 17:19:37 +1100
commit2e0e865ca5f8252b84571b23bb7be0fa76faacfb (patch)
treeb65951b9b70b854c4a474f7bef2d9b7dfb364cde
parentf3e52900128c0d536a747433fd4120b5f1de1e7d (diff)
downloadprocps-ng-2e0e865ca5f8252b84571b23bb7be0fa76faacfb.tar.gz
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 <csmall@dropbear.xyz>
-rw-r--r--pgrep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pgrep.c b/pgrep.c
index 6457fd4..cbcb4cb 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;