fix prevent issue
authorjc815.lee <jc815.lee@samsung.com>
Fri, 14 Jun 2013 12:37:57 +0000 (21:37 +0900)
committerjc815.lee <jc815.lee@samsung.com>
Fri, 14 Jun 2013 12:38:28 +0000 (21:38 +0900)
[model] GT-I8800
[binary_type] platform
[customer] OPEN
[issue#] cid : 58892
[problem] Dereference before null check
[cause] N/A
[solution] change dereference code
[team] Framework
[request] N/A
[horizontal_expansion]

Change-Id: Ia720369572773a44c4a8de1b8c4301322e266555
Signed-off-by: jc815.lee <jc815.lee@samsung.com>
vcore/src/vcore/Base64.cpp

index 88a9b28..82398aa 100644 (file)
@@ -80,13 +80,13 @@ void Base64Encoder::reset()
     m_finalized = false;
     BIO_free_all(m_b64);
     m_b64 = BIO_new(BIO_f_base64());
-    BIO_set_flags(m_b64, BIO_FLAGS_BASE64_NO_NL);
     m_bmem = BIO_new(BIO_s_mem());
     if (!m_b64 || !m_bmem) {
         LogError("Error during allocation memory in BIO");
         ThrowMsg(Exception::InternalError,
                  "Error during allocation memory in BIO");
     }
+    BIO_set_flags(m_b64, BIO_FLAGS_BASE64_NO_NL);
     m_b64 = BIO_push(m_b64, m_bmem);
 }