mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 20:37:06 +00:00
awk: errror on printf format strings lacking conversion specifier
Reported by: phk
Reviewed by: imp, markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39573
(cherry picked from commit 5dbd073b04
)
This commit is contained in:
parent
07bd2fc402
commit
46529cb990
|
@ -912,6 +912,9 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co
|
||||||
case 'c':
|
case 'c':
|
||||||
flag = 'c';
|
flag = 'c';
|
||||||
break;
|
break;
|
||||||
|
case '\0':
|
||||||
|
FATAL("missing printf conversion specifier");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WARNING("weird printf conversion %s", fmt);
|
WARNING("weird printf conversion %s", fmt);
|
||||||
flag = '?';
|
flag = '?';
|
||||||
|
|
Loading…
Reference in a new issue