From: jc815.lee Date: Fri, 14 Jun 2013 12:37:57 +0000 (+0900) Subject: fix prevent issue X-Git-Tag: accepted/tizen/20130912.082418^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac450f0b99c8ec96fed4b85aa479b7178690220a;p=platform%2Fcore%2Fsecurity%2Fcert-svc.git fix prevent issue [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 --- diff --git a/vcore/src/vcore/Base64.cpp b/vcore/src/vcore/Base64.cpp index 88a9b28..82398aa 100644 --- a/vcore/src/vcore/Base64.cpp +++ b/vcore/src/vcore/Base64.cpp @@ -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); }