summaryrefslogtreecommitdiff
path: root/strciphr.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-09-03 10:52:59 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-09-03 10:52:59 +0000
commitbf7ce9baa84e06a5bf001e55db1111c1050e2cfc (patch)
tree4e5cf561c5eff41b0fb05b78a8a51a32d9eb8635 /strciphr.h
parentfa4774e7d94e01b1f97c2126821544aec8e001a4 (diff)
downloadcryptopp-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.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/strciphr.h b/strciphr.h
index 4fb1808..27ca67e 100644
--- a/strciphr.h
+++ b/strciphr.h
@@ -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
{