Backed off ASSERT. PKCS12_PBKDF and other classes use truncated buffers

pull/378/head
Jeffrey Walton 2017-01-29 00:19:28 -05:00
parent de688a66d9
commit 6d86e546f9
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 1 additions and 1 deletions

View File

@ -3356,10 +3356,10 @@ size_t Integer::MinEncodedSize(Signedness signedness) const
return outputLen; return outputLen;
} }
// PKCS12_PBKDF and other classes use undersized buffers
void Integer::Encode(byte *output, size_t outputLen, Signedness signedness) const void Integer::Encode(byte *output, size_t outputLen, Signedness signedness) const
{ {
CRYPTOPP_ASSERT(output && outputLen); // NULL buffer CRYPTOPP_ASSERT(output && outputLen); // NULL buffer
CRYPTOPP_ASSERT(outputLen >= MinEncodedSize()); // Undersized buffer
ArraySink sink(output, outputLen); ArraySink sink(output, outputLen);
Encode(sink, outputLen, signedness); Encode(sink, outputLen, signedness);
} }