diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-09-03 10:52:59 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-09-03 10:52:59 +0000 |
commit | bf7ce9baa84e06a5bf001e55db1111c1050e2cfc (patch) | |
tree | 4e5cf561c5eff41b0fb05b78a8a51a32d9eb8635 /strciphr.h | |
parent | fa4774e7d94e01b1f97c2126821544aec8e001a4 (diff) | |
download | cryptopp-bf7ce9baa84e06a5bf001e55db1111c1050e2cfc.tar.gz |
fix WAKE_CFB
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@192 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'strciphr.h')
-rw-r--r-- | strciphr.h | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -189,11 +189,16 @@ struct CRYPTOPP_NO_VTABLE CFB_CipherConcretePolicy : public BASE if (m_dir == ENCRYPTION) { - WordType ct = *(const WordType *)m_input ^ registerWord; - registerWord = ct; - *(WordType*)m_output = ct; - m_input += sizeof(WordType); - m_output += sizeof(WordType); + if (m_input == NULL) + assert(m_output == NULL); + else + { + WordType ct = *(const WordType *)m_input ^ registerWord; + registerWord = ct; + *(WordType*)m_output = ct; + m_input += sizeof(WordType); + m_output += sizeof(WordType); + } } else { |