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:
parent
f3e5290012
commit
2e0e865ca5
2
pgrep.c
2
pgrep.c
@ -534,7 +534,7 @@ static regex_t * do_regcomp (void)
|
|||||||
|
|
||||||
if (re_err) {
|
if (re_err) {
|
||||||
regerror (re_err, preg, errbuf, sizeof(errbuf));
|
regerror (re_err, preg, errbuf, sizeof(errbuf));
|
||||||
xerrx(EXIT_USAGE, errbuf);
|
xerrx(EXIT_USAGE, _("regex error: %s"), errbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return preg;
|
return preg;
|
||||||
|
Loading…
Reference in New Issue
Block a user