Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing a zone file without a trailing newline results in an infinite loop #19

Open
fizzyduck opened this issue Oct 19, 2020 · 0 comments

Comments

@fizzyduck
Copy link

$this->tokens[$tokenName] = trim($this->tokens[$tokenName]);

In RData.php, line 205, we have:

                    if($this->stream->isEnd()) {
                        $this->tokens[$tokenName] = trim($this->tokens[$tokenName]);
                    }
                    goto start;

The problem is that isEnd() returns true, but the code still goes back to start:.

On line 155, the code should check for isEnd() as well as AsciiChar::NULL to prevent the infinite loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant