summaryrefslogtreecommitdiff
path: root/asn.cpp
diff options
context:
space:
mode:
authorWei Dai <weidai@weidai.com>2015-06-03 16:57:30 -0700
committerWei Dai <weidai@weidai.com>2015-06-03 16:57:30 -0700
commite0959c5293804927de558a4874e87c01946c118b (patch)
tree040dfe9cc2c30b70a4ad1f4a3433faf8628f71de /asn.cpp
parent789f81f048c9bc472c7e7596f49b02eadd6fc1fd (diff)
downloadcryptopp-git-e0959c5293804927de558a4874e87c01946c118b.tar.gz
small optimization
no need to use resize here, which copies old content
Diffstat (limited to 'asn.cpp')
-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;