Comments (5)
Thank you for pointing out the potential memory leak.
In write_volume_name(), I should not be returning from inside the try. I normally don't do that, because I normally want to use the catch to set an error return value and free resources after the catch block.
In this particular case, the error condition on line 426 is extremely unlikely to happen, and the code is called only when the fs is unmounted and only if the user has changed the volume name.
It will be fixed in the next release.
I started coding cppcryptfs after a long hiatus from C++ programming. I wrote most of the code before I started learning the new features from c++11. That is why you see c++11 features used in some places but not in other places where it would be desirable to use them.
I agree that I should have used the RAII pattern more and there are many places where std::vector should have been used instead of a raw buffer and also many places where std::unique_ptr would have been useful.
from cppcryptfs.
I suspected that returning early with return statement was probably a lapse of some sort since your code pattern seems to be returning early by throwing.
If you are using C++14, a function that i use to manage pointer based resource with std::unique_ptr is here[1]. It should be easy to write a custom function that returns a FILE handle for the function to manage. It should be easy to modify the function to be C++11. Let me know if you want to use it and want it to be customized for your particular case and i will make a pull request with the necessary changes.
from cppcryptfs.
Yes, I can use C++14. I would like for you to make a pull request with your changes please.
from cppcryptfs.
My fork of your repository is here[1] and i have made these[2] changes so far.
[1] https://github.com/mhogomchungu/cppcryptfs
[2] https://github.com/mhogomchungu/cppcryptfs/commits/master
any comments?
from cppcryptfs.
Pull request merged. Thank you!
from cppcryptfs.
Related Issues (20)
- Unauthorized Internet connection HOT 2
- Copy file to google drive thrown exception
- Gocryptfs with scryptn >16 is not compatible HOT 3
- Add note to encrypt pagefile on Windows HOT 1
- Question: is CppCryptFs (& GoCryptfs) capable for holding mountable Virtual Drives & containers (.vmdk, .vhd, .vhdx, .img etc) HOT 1
- absolutely cant use !!!!
- Moving from DIRIV to DETERMINISTIC
- Add extension to encrypted file. HOT 4
- Unable to open pipe. lastErr = 2 The system cannot find the file specified. Is cppcryptfs running?
- any tool to get back the filename from an encrypted file+filename, provided i got the .diriv file on hand? HOT 1
- Popup "Dokany version 2.1.0.1000 has not been tested"- no problems so far, option to disable popup
- Unmount on close? HOT 1
- ERROR C:\git\cppcryptfs\x64\Release\cppcryptfs.exe The system cannot find the files specifed
- Taskbar tray icon disappears on Windows Explorer crash
- Feature Request for Reverse Mode: Content-Defined Chunking
- Connect with a Key Management System (KMS)
- [Request] Integration with Windows Hello.
- Dokany 2.2.0.1000 has been released HOT 1
- Support for multiple languages HOT 1
- [FR, LLMs] Would an AutoHotkey Script Enhance --list Functionality?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppcryptfs.