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

Check for null pointer passed to memcpy #1296

Merged
merged 1 commit into from
Nov 6, 2022

Conversation

cary-ilm
Copy link
Member

@cary-ilm cary-ilm commented Nov 5, 2022

This only happens when the size parameter is 0, in which memcpy will not fail, but SonarCloud flags this as a problem:

https://sonarcloud.io/project/issues?resolved=false&sinceLeakPeriod=true&types=BUG&id=AcademySoftwareFoundation_openexr&open=AYPeU0_LmU8C9mUeoOgr

Signed-off-by: Cary Phillips [email protected]

This only happens when the size parameter is 0, in which memcpy will
not fail, but SonarCloud flags this as a problem:

https://sonarcloud.io/project/issues?resolved=false&sinceLeakPeriod=true&types=BUG&id=AcademySoftwareFoundation_openexr&open=AYPeU0_LmU8C9mUeoOgr

Signed-off-by: Cary Phillips <[email protected]>
@cary-ilm cary-ilm merged commit c0c81ea into AcademySoftwareFoundation:main Nov 6, 2022
@cary-ilm cary-ilm deleted the sonar-bug-fix branch January 4, 2023 01:52
cary-ilm added a commit to cary-ilm/openexr that referenced this pull request Mar 3, 2023
This only happens when the size parameter is 0, in which memcpy will
not fail, but SonarCloud flags this as a problem:

https://sonarcloud.io/project/issues?resolved=false&sinceLeakPeriod=true&types=BUG&id=AcademySoftwareFoundation_openexr&open=AYPeU0_LmU8C9mUeoOgr

Signed-off-by: Cary Phillips <[email protected]>

Signed-off-by: Cary Phillips <[email protected]>
cary-ilm added a commit that referenced this pull request Mar 5, 2023
This only happens when the size parameter is 0, in which memcpy will
not fail, but SonarCloud flags this as a problem:

https://sonarcloud.io/project/issues?resolved=false&sinceLeakPeriod=true&types=BUG&id=AcademySoftwareFoundation_openexr&open=AYPeU0_LmU8C9mUeoOgr

Signed-off-by: Cary Phillips <[email protected]>

Signed-off-by: Cary Phillips <[email protected]>
@cary-ilm cary-ilm added the v3.1.6 label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants