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

Add tests for integer overflow #541

Open
bratpiorka opened this issue Jun 12, 2024 · 2 comments · May be fixed by #587
Open

Add tests for integer overflow #541

bratpiorka opened this issue Jun 12, 2024 · 2 comments · May be fixed by #587
Assignees
Labels
enhancement New feature or request

Comments

@bratpiorka
Copy link
Contributor

The application performs a calculation that can produce an integer overflow or underflow. This can happen when an application's logic assumes that a resulting value will always be larger or smaller than the original value. This can lead to other weaknesses because the size of the buffer is incorrectly calculated, such as a buffer overflow.

Use the following guidelines to test for integer overflow:

  • Identify sections of the site that perform integer arithmetic with user-supplied values.
  • Provide large negative and positive values and inspect the result.
  • This test fails if the result is negative when it should be positive, or vice-versa.
@bratpiorka bratpiorka added the enhancement New feature or request label Jun 12, 2024
@bratpiorka
Copy link
Contributor Author

note: use "unsigned" where this make sense

@bratpiorka
Copy link
Contributor Author

PR: #587

@bratpiorka bratpiorka linked a pull request Oct 25, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants