From: Duyoung Jang Date: Wed, 12 Jun 2013 01:12:23 +0000 (+0900) Subject: Fix prevent issue X-Git-Tag: accepted/tizen/20130924.032527~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86b1147e1611ac81a3238630398ace52ed2c9cc4;p=platform%2Fframework%2Fnative%2Finstaller.git Fix prevent issue Change-Id: Id383ce864c97615e90cc67c2a4e33e5a29a0451a Signed-off-by: Duyoung Jang --- diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index 4f9f787..74d0952 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -23,7 +23,7 @@ #include "InstallerUtil.h" -#define OSP_INSTALLER_VERSION "version=[20130611.2]" +#define OSP_INSTALLER_VERSION "version=[20130612.1]" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" diff --git a/src/Util/InstallerUtil.cpp b/src/Util/InstallerUtil.cpp index 72219c3..73ca8cb 100755 --- a/src/Util/InstallerUtil.cpp +++ b/src/Util/InstallerUtil.cpp @@ -377,6 +377,9 @@ InstallerUtil::IsDrmFile(const String& path) char* pErrorMsg = null; int (*drm_oem_sapps_is_drm_file)(const char* pDcfPath, int dcfPathLen); + std::unique_ptr pFilePath(_StringConverter::CopyToCharArrayN(path)); + TryReturn(pFilePath, false, "pFilePath is null."); + pHandle = dlopen("/usr/lib/libdrm-service-core-sapps.so.0", RTLD_LAZY | RTLD_GLOBAL); if (!pHandle) { @@ -393,9 +396,6 @@ InstallerUtil::IsDrmFile(const String& path) return false; } - std::unique_ptr pFilePath(_StringConverter::CopyToCharArrayN(path)); - TryReturn(pFilePath, false, "pFilePath is null."); - AppLog("[drm] drm_oem_sapps_is_drm_file(%s, %d)", pFilePath.get(), strlen(pFilePath.get())); ret = drm_oem_sapps_is_drm_file(pFilePath.get(), strlen(pFilePath.get())); AppLog("[drm] drm_oem_sapps_is_drm_file(), result = [%d]", ret); @@ -421,6 +421,12 @@ InstallerUtil::DecryptPackage(const String& path, const String& decryptedPath) char* pErrorMsg = null; int (*drm_oem_sapps_decrypt_package)(const char* pDcfPath, int dcfPathLen, const char* pDecryptedFile, int decryptedFileLen); + std::unique_ptr pFilePath(_StringConverter::CopyToCharArrayN(path)); + TryReturn(pFilePath, false, "pFilePath is null."); + + std::unique_ptr pDecryptedPath(_StringConverter::CopyToCharArrayN(decryptedPath)); + TryReturn(pDecryptedPath, false, "pDecryptedPath is null."); + pHandle = dlopen("/usr/lib/libdrm-service-core-sapps.so.0", RTLD_LAZY | RTLD_GLOBAL); if (!pHandle) { @@ -437,12 +443,6 @@ InstallerUtil::DecryptPackage(const String& path, const String& decryptedPath) return false; } - std::unique_ptr pFilePath(_StringConverter::CopyToCharArrayN(path)); - TryReturn(pFilePath, false, "pFilePath is null."); - - std::unique_ptr pDecryptedPath(_StringConverter::CopyToCharArrayN(decryptedPath)); - TryReturn(pDecryptedPath, false, "pDecryptedPath is null."); - AppLog("[drm] drm_oem_sapps_decrypt_package(%s, %d, %s, %d)", pFilePath.get(), strlen(pFilePath.get()), pDecryptedPath.get(), strlen(pDecryptedPath.get())); ret = drm_oem_sapps_decrypt_package(pFilePath.get(), strlen(pFilePath.get()), pDecryptedPath.get(), strlen(pDecryptedPath.get())); AppLog("[drm] drm_oem_sapps_decrypt_package(), result = [%d]", ret);