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 in luigi2 #30

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

Conversation

OetkenPurveyorOfCode
Copy link

Fixes signed integer overflow by using unsigned defined constants.

.\luigi2 (beta).h:4138:23: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .\luigi2 (beta).h:4138:23
...

Avoids passing a passing a nullptr to memove:

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .\luigi2 (beta).h:2041:84
.\luigi2 (beta).h:3114:44: runtime error: applying zero offset to null pointer
...

Removes the unsused variable width on line 3198.

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.

1 participant