-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 leak vulnerability in try-catch in walletconsole/Util.cpp #1286
Comments
@brutalsavage , could you specify the source file location? thanks |
@catenocrypt here is the vulnerable function wallet-core/walletconsole/lib/Util.cpp Lines 68 to 95 in 883e0e5
|
@catenocrypt Hi! Thanks for taking a look at this and fixing it. This vulnerability was detected by our deep learning based vulnerability detection model. Along with the detection, our model also localizes the vulnerability by producing a version of the function with code that contributed to the vulnerability highlighted. We provide the localization output of the vulnerable function identified in this Issue. The intensity of the highlight correspond to how important the code snippet was for vulnerability detection in this function. As part of our university research project we would like to evaluate the usefulness of the model’s localization outputs. You can help us out by clicking one of the options below: |
Describe the bug
buffer
is allocated intry
block however there is nodelete
call for deallocation incatch
block for if the exception is thrown after the buffer allocation. If the exception is thrown afternew
there is a memory leak. Potential exception can be thrown frominfile.gcount()
orinfile.close()
.This is similar to #921 except the missing
delete
is in thecatch
block.The text was updated successfully, but these errors were encountered: