mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-01 06:12:52 -08:00
Improve error reporing of layered streams.
This commit is contained in:
1 parent
f6243675c9
commit
cfffdae573
4 files changed
+22
-15
No files matched your search
@@ -147,6 +147,7 @@ bool SymmetricCipherStream::readBlock()
|
||||
else if (padLength > m_cipher->blockSize()) {
|
||||
// invalid padding
|
||||
m_error = true;
|
||||
setErrorString("Invalid padding.");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
@@ -217,7 +218,7 @@ bool SymmetricCipherStream::writeBlock(bool lastBlock)
|
||||
|
||||
if (m_baseDevice->write(m_buffer) != m_buffer.size()) {
|
||||
m_error = true;
|
||||
// TODO: copy error string
|
||||
setErrorString(m_cipher->errorString());
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user