← Commit list

75a1c8735

Denys Vlasenko
Denys Vlasenko
2018-11-28
SUCCESS Duration: 309s

Subject

awk: abort if NF set to negative value

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/awk.c+2 -0
@@ -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 */