aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-03-27 16:57:44 +0000
committerlloyd <[email protected]>2013-03-27 16:57:44 +0000
commit3bf1f1321c3c78c499d7e44c9fb2ca97b927f5a1 (patch)
tree2f40ca20c82807808d073f63f212c1624319911d /src
parent2b6c3d5c96d6787b360c14de590183ab1984cebb (diff)
Resize each time in the loop
Diffstat (limited to 'src')
-rw-r--r--src/filters/aead_filt/aead_filt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filters/aead_filt/aead_filt.cpp b/src/filters/aead_filt/aead_filt.cpp
index 62f692ed2..f70b8eafe 100644
--- a/src/filters/aead_filt/aead_filt.cpp
+++ b/src/filters/aead_filt/aead_filt.cpp
@@ -77,11 +77,11 @@ void AEAD_Filter::start_msg()
void AEAD_Filter::buffered_block(const byte input[], size_t input_length)
{
- secure_vector<byte> buf(m_aead->update_granularity());
+ secure_vector<byte> buf;
while(input_length)
{
- const size_t take = std::min(buf.size(), input_length);
+ const size_t take = std::min(m_aead->update_granularity(), input_length);
buf.resize(take);
copy_mem(&buf[0], input, take);