Avoid accessing pfile[] out of bounds on syntax error at EOF. (#90)
When awk reaches EOF parsing the program file, curpfile is incremented. However, cursource() uses curpfile without checking it against npfile which can cause an out of bounds access of pfile[] if there is a syntax error at the end of the program file.
This commit is contained in:
parent
e22bb7c625
commit
453ce8642b
1
bugs-fixed/pfile-overflow.awk
Normal file
1
bugs-fixed/pfile-overflow.awk
Normal file
@ -0,0 +1 @@
|
||||
\
|
4
bugs-fixed/pfile-overflow.ok
Normal file
4
bugs-fixed/pfile-overflow.ok
Normal file
@ -0,0 +1,4 @@
|
||||
../a.out: syntax error at source line 1 source file pfile-overflow.awk
|
||||
context is
|
||||
>>> <<<
|
||||
../a.out: bailing out at source line 1 source file pfile-overflow.awk
|
Loading…
Reference in New Issue
Block a user