bugfix:countrycodemanager fuzz crash

Signed-off-by: 李文龙 <liwenlong22@huawei.com>
This commit is contained in:
李文龙 2024-07-20 10:34:17 +08:00
parent 5cf5b6fcac
commit 56fb2936a3
2 changed files with 4 additions and 0 deletions

View File

@ -155,6 +155,8 @@ ohos_static_library("locator_sdk_static") {
defines += [ "EMULATOR_ENABLED" ]
}
defines += [ "TEST_CASES_ENABLED" ]
cflags_cc = [
"-std=c++17",
"-fno-rtti",

View File

@ -41,8 +41,10 @@ public:
{
if (handle_) {
LBSLOGI(COMMON_UTILS, "%{public}s close so [%{public}s]", __func__, libPath_.c_str());
#ifndef TEST_CASES_ENABLED
dlclose(handle_);
handle_ = nullptr;
#endif
}
}