summaryrefslogtreecommitdiff
path: root/strciphr.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-07-12 08:29:46 -0400
committerJeffrey Walton <noloader@gmail.com>2018-07-12 08:29:46 -0400
commitbbf9a109f268d59185713b64b74e6b55ccfb1571 (patch)
treeddd91fbb4bd79e387480adfbe08200d89247e700 /strciphr.h
parent6434ec597de38cad9762b8d6fff61ddac45aab72 (diff)
downloadcryptopp-git-bbf9a109f268d59185713b64b74e6b55ccfb1571.tar.gz
Increase use of ptrdiff_t when performing pointer math
This fixes the incorrect result with CFB mode on A-32 in CFB_CipherTemplate<BASE>::ProcessData
Diffstat (limited to 'strciphr.h')
-rw-r--r--strciphr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/strciphr.h b/strciphr.h
index 9198b55a..b726d0a7 100644
--- a/strciphr.h
+++ b/strciphr.h
@@ -376,7 +376,7 @@ protected:
unsigned int GetBufferByteSize(const PolicyInterface &policy) const {return policy.GetBytesPerIteration() * policy.GetIterationsToBuffer();}
inline byte * KeystreamBufferBegin() {return this->m_buffer.data();}
- inline byte * KeystreamBufferEnd() {return (this->m_buffer.data() + this->m_buffer.size());}
+ inline byte * KeystreamBufferEnd() {return (PtrAdd(this->m_buffer.data(), this->m_buffer.size()));}
SecByteBlock m_buffer;
size_t m_leftOver;