diff options
author | Brian Foley <bpfoley@google.com> | 2016-10-15 14:45:40 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-24 02:09:56 +0200 |
commit | 61d5997b586a28f79d54b28ce6963b643dff6e9e (patch) | |
tree | 161fb8911ed9a5bda79d1a1f8ac34534aae40564 /testsuite | |
parent | 1336052a490ffe7a3790ee3c1366756ca8a7f5ca (diff) | |
download | busybox-w32-61d5997b586a28f79d54b28ce6963b643dff6e9e.tar.gz busybox-w32-61d5997b586a28f79d54b28ce6963b643dff6e9e.tar.bz2 busybox-w32-61d5997b586a28f79d54b28ce6963b643dff6e9e.zip |
awk: fix segfault on for loop syntax error
Parsing "for()" segfaults as awk fails to find loop iteration expressions.
Signed-off-by: Brian Foley <bpfoley@google.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/awk.tests | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index adab4ae1e..82937bc10 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests | |||
@@ -316,6 +316,9 @@ testing "awk continue" \ | |||
316 | "" \ | 316 | "" \ |
317 | 'BEGIN { if (1) continue; else a = 1 }' | 317 | 'BEGIN { if (1) continue; else a = 1 }' |
318 | 318 | ||
319 | testing "awk handles invalid for loop" \ | ||
320 | "awk '{ for() }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" "" | ||
321 | |||
319 | # testing "description" "command" "result" "infile" "stdin" | 322 | # testing "description" "command" "result" "infile" "stdin" |
320 | 323 | ||
321 | exit $FAILCOUNT | 324 | exit $FAILCOUNT |