aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/awk.c2
1 files changed, 2 insertions, 0 deletions
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 */