diff --git a/services/common/src/bundle_active_config_reader.cpp b/services/common/src/bundle_active_config_reader.cpp index 5a8467e268fdf1a91cfd5fef468962610d49a790..95c27f8ffc660ef519da619be92677845c816790 100644 --- a/services/common/src/bundle_active_config_reader.cpp +++ b/services/common/src/bundle_active_config_reader.cpp @@ -95,7 +95,10 @@ bool BundleActiveConfigReader::GetJsonFromFile(const char *filePath, Json::Value } BUNDLE_ACTIVE_LOGD("Read from %{private}s", realPath.c_str()); std::string data; - LoadStringFromFile(realPath.c_str(), data); + if (!LoadStringFromFile(realPath.c_str(), data)) { + BUNDLE_ACTIVE_LOGE("load string from %{private}s failed", realPath.c_str()); + return false; + } if (data.empty()) { return false; }