From 3260ea03a8f31203a7d5d69c2986f9c9f4350b84 Mon Sep 17 00:00:00 2001 From: Jaechul Lee Date: Thu, 15 Jul 2021 10:27:15 +0900 Subject: [PATCH] Fix SVACE DEREF_OF_NULL.RET.PROC.STAT [Version] 0.0.10 [Issue Type] SVACE Change-Id: Ifde946e93c9f44e0d9a34289b128d04ddd220057 Signed-off-by: Jaechul Lee --- packaging/hal-api-audio.spec | 2 +- testcase/parser.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packaging/hal-api-audio.spec b/packaging/hal-api-audio.spec index 958b69c..6b660ba 100644 --- a/packaging/hal-api-audio.spec +++ b/packaging/hal-api-audio.spec @@ -1,6 +1,6 @@ Name: hal-api-audio Summary: TIZEN Audio HAL -Version: 0.0.9 +Version: 0.0.10 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/testcase/parser.cpp b/testcase/parser.cpp index e22a950..cc49b6e 100644 --- a/testcase/parser.cpp +++ b/testcase/parser.cpp @@ -218,7 +218,9 @@ void CDeviceMapParser::parse_device_role_object(json_object *device_role_o, stri it_end = json_object_iter_end(device_role_o); while (!json_object_iter_equal(&it, &it_end)) { - if (strcmp(json_object_iter_peek_name(&it), "normal") == 0) { + const char *name = json_object_iter_peek_name(&it); + + if (name && !strcmp(name, "normal")) { device_params.assign(json_object_get_string(json_object_iter_peek_value(&it))); cout << " " << DEVICE_TYPE_PROP_ROLE << " : { normal : " << device_params << " }" << endl; break; -- 2.34.1