From 2f1e2b6167ede7c37efd8800555633a4c79d82fe Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 1 Oct 2010 03:46:16 +0000 Subject: Also deal with short values in OctetString --- src/sym_algo/symkey.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 decoded(hex_string.length() / 2); + SecureVector decoded(1 + hex_string.length() / 2); u32bit written = hex_decode(&decoded[0], hex_string); -- cgit v1.2.3