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 DivideByZero.java #70

Closed
wants to merge 1 commit into from
Closed

Add DivideByZero.java #70

wants to merge 1 commit into from

Conversation

chuckaude
Copy link

Thank you for submitting a pull request to the WebGoat!

if (a!=0) {
//Do something
}
int y = b / a;

Choose a reason for hiding this comment

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

Automated PR Comment From coverity

Coverity Issue - Division or modulo by zero

Medium CWE-369
In expression "b / a", division by expression "a" which may be zero results in an exception.

The program will raise an exception.

if (a!=0) {
//Do something
}
int y = b / a;

Choose a reason for hiding this comment

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

Automated PR Comment From coverity

Coverity Issue - DLS: Dead local store

Low CWE-563
Dead store to y.

@chuckaude chuckaude closed this Oct 3, 2024
@chuckaude chuckaude deleted the chuckaude-patch-2 branch October 3, 2024 14:50
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