diff options
author | weidai <weidai11@users.noreply.github.com> | 2004-09-03 10:52:59 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2004-09-03 10:52:59 +0000 |
commit | bfd8ad2f1fc1652d3ccabcbeb4cb94147cad63ff (patch) | |
tree | 4e5cf561c5eff41b0fb05b78a8a51a32d9eb8635 | |
parent | 6d4f31be8b397f8c3c3ed09c2cab1a5d51d15a93 (diff) | |
download | cryptopp-git-bfd8ad2f1fc1652d3ccabcbeb4cb94147cad63ff.tar.gz |
fix WAKE_CFB
-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 { |