summaryrefslogtreecommitdiff
path: root/strciphr.h
diff options
context:
space:
mode:
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 4fb1808a..27ca67ee 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
{