aboutsummaryrefslogtreecommitdiffstats
path: root/src/sym_algo
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-01 03:46:16 +0000
committerlloyd <[email protected]>2010-10-01 03:46:16 +0000
commit2f1e2b6167ede7c37efd8800555633a4c79d82fe (patch)
treefb8237a74d70c1af7163fcb4e590d955cf3fe9f4 /src/sym_algo
parentda67713c92db146beba76dcf3b46291b1b8141ae (diff)
Also deal with short values in OctetString
Diffstat (limited to 'src/sym_algo')
-rw-r--r--src/sym_algo/symkey.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sym_algo/symkey.cpp b/src/sym_algo/symkey.cpp
index 63b3e75b7..4452fd8fb 100644
--- a/src/sym_algo/symkey.cpp
+++ b/src/sym_algo/symkey.cpp
@@ -28,7 +28,7 @@ OctetString::OctetString(RandomNumberGenerator& rng,
*/
void OctetString::change(const std::string& hex_string)
{
- SecureVector<byte> decoded(hex_string.length() / 2);
+ SecureVector<byte> decoded(1 + hex_string.length() / 2);
u32bit written = hex_decode(&decoded[0], hex_string);