From: Przemyslaw Ciezkowski
Date: Tue, 6 Nov 2012 14:47:35 +0000 (+0100)
Subject: Fix for use after free
X-Git-Tag: submit/trunk/20121123.012120~4
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8bd2f8d1d00b89bf7f622c8b321e0de4ac99bcf0;p=platform%2Fframework%2Fweb%2Fwrt-plugins-common.git
Fix for use after free
[Issue#] N/A
[Bug] Directory structure is being passed to log message when
closedir fails.
[Cause] N/A
[Solution] It is better to pass directory path.
[Verification] Call wrt_reset_all.sh and run plugin installation.
Change-Id: Ib0e89991e8fc4b9a3be10172c5adf788c61a93fe
---
diff --git a/src/plugins-installer/wrt-installer/wrt_installer_api.cpp b/src/plugins-installer/wrt-installer/wrt_installer_api.cpp
index 2ef0353..c6df7d8 100755
--- a/src/plugins-installer/wrt-installer/wrt_installer_api.cpp
+++ b/src/plugins-installer/wrt-installer/wrt_installer_api.cpp
@@ -508,7 +508,7 @@ extern "C"
}
if (-1 == TEMP_FAILURE_RETRY(closedir(dir))) {
- LogError("Failed to close dir: " << dir);
+ LogError("Failed to close dir: " << PLUGIN_PATH);
}
if (0 != unlink(installRequest.c_str())) {