From 2dbdd5040c195b0045e5c6fb9d0497a7c150edc4 Mon Sep 17 00:00:00 2001 From: Lukasz Stanislawski Date: Wed, 7 Jun 2017 08:41:40 +0200 Subject: [PATCH] Utils: perform additional null check Perform additional null check, since app_get_* methods may return null. Issue was spotted by using fault sanitizer tool. Change-Id: I61f4e2ad1544d2d9db3ddd04b581dd001dd5950b --- clock/src/Utils/TizenAppUtils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clock/src/Utils/TizenAppUtils.cpp b/clock/src/Utils/TizenAppUtils.cpp index 6d5d6ea..866fc56 100644 --- a/clock/src/Utils/TizenAppUtils.cpp +++ b/clock/src/Utils/TizenAppUtils.cpp @@ -60,6 +60,8 @@ const char *TizenAppUtils::GetResourcePath(enum AppSubdirectory dir, const char dlog_print(DLOG_FATAL, LOG_TAG, "Not handled directory type."); return NULL; } + if (!prefix) + return NULL; size_t res = eina_file_path_join(buf, sizeof(buf), prefix, relative); free(prefix); if (res > sizeof(buf)) { -- 2.7.4