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 CLI abort when non lua string passed to error #114

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

grant-h
Copy link
Contributor

@grant-h grant-h commented Nov 4, 2021

Executing error((true)) or similar will cause std::string to abort due to a NULL pointer assignment. Found via fuzzing.

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted

Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

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

Thanks!

@zeux zeux merged commit e3f8c25 into luau-lang:master Nov 4, 2021
{
error = "thread yielded unexpectedly";
}
else if (const char* str = lua_tostring(L, -1))
Copy link
Contributor

Choose a reason for hiding this comment

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

@zeux Seems like this slipped through. In this context T represents the Luau VM context.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Single-letter variable names ftw. Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixed in master

zeux added a commit that referenced this pull request Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants