Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wolfi323:branches:KDE:Frameworks5
kvirc4
rijndael-module_Fix-potential-memory-leak-and-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rijndael-module_Fix-potential-memory-leak-and-invalid-length-check.patch of Package kvirc4
From 2d5fd9def3a59489561ca53dd933ca7e86342ba7 Mon Sep 17 00:00:00 2001 From: IceN9ne <IceN9ne.code@gmail.com> Date: Thu, 9 Mar 2017 19:19:07 -0500 Subject: [PATCH] rijndael module: Fix potential memory leak and invalid length check --- src/modules/rijndael/libkvirijndael.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/rijndael/libkvirijndael.cpp b/src/modules/rijndael/libkvirijndael.cpp index 73f02b6ce..f8443b7b9 100644 --- a/src/modules/rijndael/libkvirijndael.cpp +++ b/src/modules/rijndael/libkvirijndael.cpp @@ -220,6 +220,8 @@ KviCryptEngine::EncryptResult KviRijndaelEngine::encrypt(const char * plainText, int retVal = m_pEncryptCipher->padEncrypt((const unsigned char *)plainText,len,(unsigned char *)buf, iv); if(retVal < 0) { + if(m_bEncryptMode == CBC) + KviMemory::free(iv); KviMemory::free(buf); setLastErrorFromRijndaelErrorCode(retVal); return KviCryptEngine::EncryptError; @@ -354,7 +356,7 @@ bool KviRijndaelBase64Engine::asciiToBinary(const char * inBuffer, int * len, ch setLastError(__tr2qs("The message is not a base64 string: this is not my stuff")); return false; } else { - if(len > 0) + if(*len > 0) { *outBuffer = (char *)KviMemory::allocate(*len); KviMemory::move(*outBuffer,tmpBuf,*len);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor