From 37cf68c8c596c5b80aa4cc45a3e9355f9d46e532 Mon Sep 17 00:00:00 2001 From: Charles Munson Date: Fri, 12 Aug 2016 08:00:56 +0200 Subject: [PATCH] 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 --- encfs/FileNode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/encfs/FileNode.cpp b/encfs/FileNode.cpp index e13b9df..0e20f76 100644 --- a/encfs/FileNode.cpp +++ b/encfs/FileNode.cpp @@ -100,7 +100,9 @@ static bool setIV(const std::shared_ptr &io, uint64_t iv) { bool FileNode::setName(const char *plaintextName_, const char *cipherName_, uint64_t iv, bool setIVFirst) { // Lock _lock( mutex ); - VLOG(1) << "calling setIV on " << cipherName_; + if (cipherName_) + VLOG(1) << "calling setIV on " << cipherName_; + if (setIVFirst) { if (fsConfig->config->externalIVChaining && !setIV(io, iv)) return false;