Skip to content

CheckBufferOverrun: bail out early in getBufferSize()#7134

Merged
chrchr-github merged 1 commit intodanmar:mainfrom
firewave:checkbuffer-early
Dec 29, 2024
Merged

CheckBufferOverrun: bail out early in getBufferSize()#7134
chrchr-github merged 1 commit intodanmar:mainfrom
firewave:checkbuffer-early

Conversation

@firewave
Copy link
Collaborator

No description provided.

if (!var)
return ValueFlow::Value(-1);

if (var->isPointer())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could be merged with the previous condition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

I initially had dim still before the condition so they were not next to each other.

@chrchr-github chrchr-github merged commit 07797da into danmar:main Dec 29, 2024
60 checks passed
@firewave firewave deleted the checkbuffer-early branch December 29, 2024 13:24
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