blautenb 2003/10/25 03:31:49
Modified: c/src/enc/OpenSSL OpenSSLCryptoSymmetricKey.cpp
Log:
Minor bug fixes
Revision Changes Path
1.8 +3 -3
xml-security/c/src/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp
Index: OpenSSLCryptoSymmetricKey.cpp
===================================================================
RCS file:
/home/cvs/xml-security/c/src/enc/OpenSSL/OpenSSLCryptoSymmetricKey.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- OpenSSLCryptoSymmetricKey.cpp 19 Oct 2003 10:57:54 -0000 1.7
+++ OpenSSLCryptoSymmetricKey.cpp 25 Oct 2003 10:31:49 -0000 1.8
@@ -315,12 +315,12 @@
int outl = maxOutLength;
- if (inLength - offset > maxOutLength) {
+ if (inLength - offset + m_bytesInLastBlock > maxOutLength) {
throw XSECCryptoException(XSECCryptoException::SymmetricError,
"OpenSSLSymmetricKey::decrypt - Not enough space in
output buffer");
}
- if (EVP_DecryptUpdate(&m_ctx, &plainBuf[m_bytesInLastBlock], &outl,
&inBuf[offset], inLength - m_bytesInLastBlock - offset) == 0) {
+ if (EVP_DecryptUpdate(&m_ctx, &plainBuf[m_bytesInLastBlock], &outl,
&inBuf[offset], inLength - offset) == 0) {
throw XSECCryptoException(XSECCryptoException::SymmetricError,
"OpenSSL:SymmetricKey - Error during OpenSSL decrypt");