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

Memory leaks #340

Open
BishopWolf opened this issue Jan 24, 2024 · 5 comments
Open

Memory leaks #340

BishopWolf opened this issue Jan 24, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@BishopWolf
Copy link

I ran a Snyk code analysis, and it detected these problems:

  1. Leaking memory. GateRandomMultiGauss is allocated on the heap and never freed

    GateRandomMultiGauss *mGaussian2DXTheta =

  2. Leaking memory. G4AffineTransform is allocated on the heap and never freed

    auto t = new G4AffineTransform(rotation, translation);

@BishopWolf
Copy link
Author

It also detected

Calling extractall to extract all files from a tar file without sanitization. This may result files outside destination directory to be overwritten, resulting in an arbitrary file write.

tar.extractall(path=dataLocation)

@nkrah
Copy link
Collaborator

nkrah commented Jan 25, 2024

Thanks for reporting. That's helpful.
We will put this on the list of issues to be addressed in the next weeks.

@nkrah nkrah added the bug Something isn't working label Jan 25, 2024
@nkrah
Copy link
Collaborator

nkrah commented Jan 25, 2024

By the way: Do you mind sharing the commands you used to do the code analysis? I am honestly not familiar with Snyk. Thanks a bunch.

@BishopWolf
Copy link
Author

Create a free account in https://snyk.io/ using your GitHub account.
Add this project to your snyk account
It will report all vulnerabilities
image

@dsarrut
Copy link
Contributor

dsarrut commented Jan 25, 2024

Awsome! Thank you very much, Alex!

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