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

Possible null pointer dereference in cpu_reorder_pd #1916

Closed
apach301 opened this issue May 14, 2024 · 0 comments · Fixed by #1917
Closed

Possible null pointer dereference in cpu_reorder_pd #1916

apach301 opened this issue May 14, 2024 · 0 comments · Fixed by #1917
Labels
sighting Suspicious library behavior. Should be promoted to a bug when confirmed

Comments

@apach301
Copy link
Contributor

apach301 commented May 14, 2024

Hi,

I found possible null pointer dereference with Svace static analyzer.

Summary

In cpu_reorder_pd::get_D_values() return parameters D_start, D_mask and D_rest are checked for NULL before usage, except last case:

if (D_start)
*D_start = utils::array_product(input_d.dims(), ndims_start);
if (D_mask)
*D_mask = utils::array_product(
input_d.dims() + ndims_start, ndims_mask);
assert(*D_mask >= 1);
if (D_rest) *D_rest = input_d.nelems() / (*D_start * *D_mask);

Version

Current main

@apach301 apach301 added the sighting Suspicious library behavior. Should be promoted to a bug when confirmed label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sighting Suspicious library behavior. Should be promoted to a bug when confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant