From 68485500fd3f436e8f52df6f6be0546f8d4b263c Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 16 Nov 2014 16:42:44 +0100 Subject: [PATCH] Log offending filename "too small" errors --- encfs/BlockNameIO.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/encfs/BlockNameIO.cpp b/encfs/BlockNameIO.cpp index 54e7b21..2c25b54 100644 --- a/encfs/BlockNameIO.cpp +++ b/encfs/BlockNameIO.cpp @@ -184,7 +184,11 @@ int BlockNameIO::decodeName(const char *encodedName, int length, uint64_t *iv, int decodedStreamLen = decLen256 - 2; // don't bother trying to decode files which are too small - if (decodedStreamLen < _bs) throw ERROR("Filename too small to decode"); + if (decodedStreamLen < _bs) + { + rDebug("Rejecting filename '%s'", encodedName); + throw ERROR("Filename too small to decode"); + } BUFFER_INIT(tmpBuf, 32, (unsigned int)length);