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
This commit is contained in:
Ed Maste 2023-04-14 10:49:05 -04:00
parent 9f324d8ac2
commit 5dbd073b04

View File

@ -912,6 +912,9 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co
case 'c':
flag = 'c';
break;
case '\0':
FATAL("missing printf conversion specifier");
break;
default:
WARNING("weird printf conversion %s", fmt);
flag = '?';