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>
This commit is contained in:
Craig Small 2021-11-02 17:19:37 +11:00
parent f3e5290012
commit 2e0e865ca5

View File

@ -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;