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

Avoid a potential CCE in Position.equals #945

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

marcus-h
Copy link

@marcus-h marcus-h commented Jun 6, 2024

The old code in sootup.core.model.Position.equals always casts the passed argument to a FullPosition. However, in theory, it is possible that there are multiple subclasses of Position. Hence, the cast could potentially result in a CCE. In order to avoid this, just cast the passed argument to Position itself, which is always safe (due to the previous checks).

The old code in sootup.core.model.Position.equals always casts the passed
argument to a FullPosition. However, in theory, it is possible that there
are multiple subclasses of Position. Hence, the cast could potentially
result in a CCE. In order to avoid this, just cast the passed argument to
Position itself, which is always safe (due to the previous checks).
@JonasKlauke JonasKlauke merged commit 2e71069 into soot-oss:develop Jun 6, 2024
7 checks passed
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.

2 participants