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 UB. #4935

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Fix UB. #4935

wants to merge 1 commit into from

Conversation

Rot127
Copy link
Member

@Rot127 Rot127 commented Feb 25, 2025

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).

Detailed description

The returned value is shifted by more than 31 bits sometimes.

Test plan

...

Closing issues

...

@Rot127 Rot127 requested a review from wargio as a code owner February 25, 2025 12:54
@Rot127 Rot127 changed the title Fix UB. The returned value is shifted by more than 31 bits sometimes. Fix UB. Feb 25, 2025
Copy link
Contributor

@notxvilka notxvilka left a comment

Choose a reason for hiding this comment

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

It's fine as is, and I know it's asking a lot, but it's wrong in the case of register having value "-1". Could you please make it return bool and return a value in the argument via pointer?

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

Successfully merging this pull request may close these issues.

3 participants