From: Denys Vlasenko Date: Wed, 28 Nov 2018 11:16:29 +0000 (+0100) Subject: awk: abort if NF set to negative value X-Git-Tag: 1_30_0~349 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=75a1c87357070ec0229f1c98d887bc1c526bb81c;p=oweals%2Fbusybox.git awk: abort if NF set to negative value Signed-off-by: Denys Vlasenko --- diff --git a/editors/awk.c b/editors/awk.c index bafc9ba1d..af103e3cc 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -1849,6 +1849,8 @@ static void handle_special(var *v) if (v == intvar[NF]) { n = (int)getvar_i(v); + if (n < 0) + syntax_error("NF set to negative value"); fsrealloc(n); /* recalculate $0 */