small optimization

no need to use resize here, which copies old content
pull/2/head
Wei Dai 2015-06-03 16:57:30 -07:00
parent 789f81f048
commit e0959c5293
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ size_t BERDecodeOctetString(BufferedTransformation &bt, SecByteBlock &str)
if (!BERLengthDecode(bt, bc)) if (!BERLengthDecode(bt, bc))
BERDecodeError(); BERDecodeError();
str.resize(bc); str.New(bc);
if (bc != bt.Get(str, bc)) if (bc != bt.Get(str, bc))
BERDecodeError(); BERDecodeError();
return bc; return bc;