projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
572dfb8
)
awk: abort if NF set to negative value
author
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 28 Nov 2018 11:16:29 +0000
(12:16 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 28 Nov 2018 11:16:29 +0000
(12:16 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/awk.c
patch
|
blob
|
history
diff --git
a/editors/awk.c
b/editors/awk.c
index bafc9ba1d382b6bbb2651469aefd12b1161625b5..af103e3cc741c08f708c1df0513f3875b233ff25 100644
(file)
--- 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 */