git: 40399b2a4a8a - stable/12 - awk: errror on printf format strings lacking conversion specifier
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 17 Apr 2023 13:13:57 UTC
The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=40399b2a4a8a1a2bceb7ab484b53aa20f7189ed9 commit 40399b2a4a8a1a2bceb7ab484b53aa20f7189ed9 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2023-04-14 14:49:05 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-04-17 13:13:45 +0000 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 5dbd073b045c8e98730c025a4acf2279be26c33e) (cherry picked from commit 46529cb990402ed46f5f3555aecc41091ef63f41) --- contrib/one-true-awk/run.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index 117fb0748bd8..b81dafba35e6 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -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 = '?';