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

new rule to check length of array #45

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

Conversation

h1kk4
Copy link
Contributor

@h1kk4 h1kk4 commented Jun 9, 2023

No description provided.

- length
patterns:
- pattern: |
function $F(..., $TYPE[] $VAR, ..., $TYPE2[] $VAR2, ...) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This pattern is very vague, $VAR and $VAR2 may not be related to each other. This rule tries to find an absence of some conditions which is not robust since you have to describe all situations.
With that said, I am not sure how to approach this vulnerability in some other way using semgrep 🤔

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