Bugfix: Segfault when running paranoid config in verbose mode

When "external IV chaining" is enabled, cipherName_ parameter may be
  NULL, resulting in segfault in verbose log attempt
This commit is contained in:
Charles Munson 2016-08-12 08:00:56 +02:00
parent 4d952b74d8
commit 37cf68c8c5

View File

@ -100,7 +100,9 @@ static bool setIV(const std::shared_ptr<FileIO> &io, uint64_t iv) {
bool FileNode::setName(const char *plaintextName_, const char *cipherName_,
uint64_t iv, bool setIVFirst) {
// Lock _lock( mutex );
if (cipherName_)
VLOG(1) << "calling setIV on " << cipherName_;
if (setIVFirst) {
if (fsConfig->config->externalIVChaining && !setIV(io, iv)) return false;