Skip to content

Conversation

@hopper-vul
Copy link

The inner implementation RE2::Set::Compile() will return true for success and false for failure of prog_ compilation.
Other APIs return -1 to inform an error, however this API use 0.
The cast int type will confuse developers to use the null prog_ without properly checking the returned status and then cause crash.

fixes: #27

Signed-off-by: hopper-vul hopper.vul@gmail.com

The inner implementation RE2::Set::Compile() will return true for success
and false for failure of prog_ compilation. The cast int type will confuse
developers to use the null prog_ without checking the returned status and then
cause crash.

Signed-off-by: hopper-vul <hopper.vul@gmail.com>
@hopper-vul
Copy link
Author

@marcomaggi Hi, would you please review this PR? I'm looking forward to your feedback.

Thanks.

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.

crash caused by confusing return type of cre2_set_compile

1 participant