diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2016-03-07 20:06:32 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2016-03-07 20:06:44 +0900 |
commit | 03112ff2183888462b9b0715e0e39d8d2abed7f3 (patch) | |
tree | 84fd61aaa01dcc1f57db5879df8da31278308fe5 | |
parent | d42162ed9c96aa00dcd320f569b780b0352d78bb (diff) | |
download | libsoup-03112ff2183888462b9b0715e0e39d8d2abed7f3.tar.gz libsoup-03112ff2183888462b9b0715e0e39d8d2abed7f3.tar.bz2 libsoup-03112ff2183888462b9b0715e0e39d8d2abed7f3.zip |
[SVACE][TIZEN_3.0_TV][Critical][WGID 41378] PROC_USE.VULNERABLEsubmit/tizen/20160307.113634accepted/tizen/wearable/20160308.022712accepted/tizen/tv/20160308.022633accepted/tizen/mobile/20160308.022557accepted/tizen/ivi/20160308.022747accepted/tizen/common/20160308.142346
Change-Id: I2ae498015b91794d3900625b7165971e4815a07b
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rwxr-xr-x | libsoup/soup-cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c index 3d033758..bd09b162 100755 --- a/libsoup/soup-cache.c +++ b/libsoup/soup-cache.c @@ -1451,7 +1451,11 @@ soup_cache_foreach_regular_file (SoupCache *cache, SoupCacheForeachFileFunc func dir = opendir(priv->cache_dir); if (dir) { struct dirent *dp; - while ((dp = readdir(dir)) != NULL) { + struct dirent dent_buf; + while (!readdir_r(dir, &dent_buf, &dp) && dp) { + if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) + continue; + name = dp->d_name; if (g_str_has_prefix (name, "soup.")) continue; |