summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asn.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/asn.cpp b/asn.cpp
index 8ae1ad65..27b49d9b 100644
--- a/asn.cpp
+++ b/asn.cpp
@@ -123,7 +123,7 @@ size_t BERDecodeOctetString(BufferedTransformation &bt, SecByteBlock &str)
if (!BERLengthDecode(bt, bc))
BERDecodeError();
- str.resize(bc);
+ str.New(bc);
if (bc != bt.Get(str, bc))
BERDecodeError();
return bc;