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>
This commit is contained in:
committed by
Denys Vlasenko
parent
1336052a49
commit
61d5997b58
@ -316,6 +316,9 @@ testing "awk continue" \
|
||||
"" \
|
||||
'BEGIN { if (1) continue; else a = 1 }'
|
||||
|
||||
testing "awk handles invalid for loop" \
|
||||
"awk '{ for() }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
|
||||
|
||||
# testing "description" "command" "result" "infile" "stdin"
|
||||
|
||||
exit $FAILCOUNT
|
||||
|
Reference in New Issue
Block a user