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

resource leak in ZIP.cpp #63

Open
ghost opened this issue Oct 28, 2016 · 0 comments
Open

resource leak in ZIP.cpp #63

ghost opened this issue Oct 28, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 28, 2016

I found the leak with the static code checking tool cppcheck. There are other minor bugs as well, but this one is the biggest.
The leak is found in file master/src/lib/io/ZIP.cpp on line 511

if(read_start<=0){std::cerr<<"ZIP: Invalid read buffer size"<<std::endl;return false;}

it should be:

if(read_start<=0){std::cerr<<"ZIP: Invalid read buffer size"<<std::endl;delete [] buf;return false;}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants