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

fix: Prevent panic when parsing empty documents #389

Merged
merged 2 commits into from May 26, 2023

Conversation

twz123
Copy link
Contributor

@twz123 twz123 commented Apr 28, 2023

The PaseDocument functions were returning the first element of the content slice unconditionally, which panicked if the given document bytes were empty. Check if the slice has some elements and return an error if it's empty instead.

See also:

The PaseDocument functions were returning the first element of the
content slice unconditionally, which panicked if the given document
bytes were empty. Check if the slice has some elements and return an
error if it's empty instead.
@twz123 twz123 requested a review from a team as a code owner April 28, 2023 19:45
Copy link
Contributor

@timburks timburks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@twz123
Copy link
Contributor Author

twz123 commented May 9, 2023

The CI failed with

This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.

Seems to be an intermittent failure of GitHub Actions?

@timburks
Copy link
Contributor

@twz123 Thanks again - we just needed #394

@timburks timburks merged commit dd1001c into google:main May 26, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants