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

False positive: memset(foo 0, sizeof(foo)) #426

Open
2 tasks
fmarier opened this issue Nov 9, 2023 · 0 comments
Open
2 tasks

False positive: memset(foo 0, sizeof(foo)) #426

fmarier opened this issue Nov 9, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@fmarier
Copy link
Member

fmarier commented Nov 9, 2023

memset(foo, 0, sizeof(foo));

will always be fine since it's explicitly checking the destination size.

Reference:
https://github.com/brave/brave-core/pull/20895/files#r1387189235
https://github.com/brave/brave-core/pull/20895/files#r1387189237

Proposed Solution

  • Remove the rule
  • Fork and improve the rule
@fmarier fmarier added the bug Something isn't working label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants