ktrdump: properly parse %% in the format string

Discovered by:	27ca37acb7
This commit is contained in:
Gleb Smirnoff 2021-12-29 23:08:15 -08:00
parent f1d5e2c862
commit dcb724b5a7

View file

@ -298,6 +298,8 @@ main(int ac, char **av)
continue;
next: if ((c = *p++) == '\0')
break;
if (c == '%')
continue;
if (parm == KTR_PARMS)
errx(1, "too many parameters in \"%s\"", desc);
switch (c) {