summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiseokChang <kiso.chang@samsung.com>2023-07-18 11:36:07 +0900
committerKiseokChang <kiso.chang@samsung.com>2023-07-18 11:37:36 +0900
commitae74b885c884770a1f2a53833651ffd479ad1ca0 (patch)
tree9fbcb867b4aaa7c100e46fb8cc8bd22ec750996d
parent02ae73c2c6ce65ba033894de5f332d74ea7e0495 (diff)
downloadsettings-tizen.tar.gz
settings-tizen.tar.bz2
settings-tizen.zip
- revert build option, Wno-stringop-overread Change-Id: Ie7e526f2e8c67bd5935be720350fe48b28d3a4d4 Signed-off-by: KiseokChang <kiso.chang@samsung.com>
-rwxr-xr-xsetting-ringtone/CMakeLists.txt1
-rwxr-xr-xsetting-ringtone/src/setting-ringtone-main.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/setting-ringtone/CMakeLists.txt b/setting-ringtone/CMakeLists.txt
index 4b94664..cd00fd3 100755
--- a/setting-ringtone/CMakeLists.txt
+++ b/setting-ringtone/CMakeLists.txt
@@ -35,6 +35,7 @@ ENDIF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DSLP_DEBUG")
ADD_DEFINITIONS("-shared")
+ADD_DEFINITIONS("-Wno-stringop-overread")
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
diff --git a/setting-ringtone/src/setting-ringtone-main.c b/setting-ringtone/src/setting-ringtone-main.c
index 95d36fd..9706a8d 100755
--- a/setting-ringtone/src/setting-ringtone-main.c
+++ b/setting-ringtone/src/setting-ringtone-main.c
@@ -351,10 +351,14 @@ static char *_get_default_filepath(SettingRingtoneData *ad)
if (ad->default_substitution)
return strndup(ad->default_substitution, PATH_MAX);
+ int maxpath = sizeof(ALERT_FILE_PATH_DEF);
+ if(maxpath > PATH_MAX) maxpath = PATH_MAX;
if (ad->show_notification)
- return strndup(ALERT_FILE_PATH_DEF, PATH_MAX);
+ return strndup(ALERT_FILE_PATH_DEF, maxpath);
- return strndup(RINGTONE_FILE_PATH_DEF, PATH_MAX);
+ maxpath = sizeof(RINGTONE_FILE_PATH_DEF);
+ if(maxpath > PATH_MAX) maxpath = PATH_MAX;
+ return strndup(RINGTONE_FILE_PATH_DEF, maxpath);
}
static void _move_more_ctxpopup(SettingRingtoneData *ad)