From 1a9d7f947e83f8a891190b410a564fe8ebf3a06b Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Wed, 13 Sep 2017 15:25:07 +0900 Subject: [PATCH] [0.3.73] use absolute path for security issue Change-Id: Ia9ee4ce34994ec99fcacd5617886be2023a579fb --- packaging/capi-media-player.spec | 3 ++- src/player.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index e8aa0ae..c8d4a36 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.72 +Version: 0.3.73 Release: 0 Group: Multimedia/API License: Apache-2.0 @@ -62,6 +62,7 @@ export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE" export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" %endif +export CFLAGS+=" -DPATH_LIBDIR=\\\"%{_libdir}\\\"" MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \ %if "%{TIZEN_PRODUCT_TV}" == "1" diff --git a/src/player.c b/src/player.c index 88333b7..b100ce2 100644 --- a/src/player.c +++ b/src/player.c @@ -48,10 +48,12 @@ #define INVALID_DEFAULT_VALUE -1 #define MAX_S_PATH_LEN 32 +#define PATH_EVAS_RENDERER_LIB PATH_LIBDIR"/libmmfevasrenderer.so.0" + #define PLAYER_VIDEO_SUPPORT_CHECK(h) \ do { \ void *_handle; \ - _handle = dlopen("libmmfevasrenderer.so.0", RTLD_LAZY); \ + _handle = dlopen(PATH_EVAS_RENDERER_LIB, RTLD_LAZY); \ if (_handle) { \ h->support_video = TRUE; \ EVAS_INFO(h)->support_video = TRUE; \ -- 2.7.4