aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-03-04 17:16:14 +0000
committerlloyd <[email protected]>2013-03-04 17:16:14 +0000
commit3fa077cffa4c1e024a3d181f7da59ad216e65055 (patch)
treefdec07e181542c14b1ae8362921926f4228eaeee /src
parentc6147dcfb05a8df25ed74253b0a7e768fae19158 (diff)
Reset position at end of CTS message. Bug 234
Diffstat (limited to 'src')
-rw-r--r--src/filters/modes/cts/cts.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/filters/modes/cts/cts.cpp b/src/filters/modes/cts/cts.cpp
index f77a28dd5..0e3c521c3 100644
--- a/src/filters/modes/cts/cts.cpp
+++ b/src/filters/modes/cts/cts.cpp
@@ -109,6 +109,7 @@ void CTS_Encryption::end_msg()
clear_mem(&buffer[position], buffer.size() - position);
encrypt(&buffer[cipher->block_size()]);
send(cn, position - cipher->block_size());
+ position = 0;
}
/*
@@ -216,6 +217,7 @@ void CTS_Decryption::end_msg()
xor_buf(&temp[0], &state[0], cipher->block_size());
send(temp, cipher->block_size());
send(xn, position - cipher->block_size());
+ position = 0;
}
}