From: Bartlomiej Grzelewski Date: Tue, 21 Jan 2014 15:02:09 +0000 (+0100) Subject: Add NULL at the end of array. X-Git-Tag: security-manager_5.5_testing~302 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4cd53318483b3af4afcdee648bcbeedaedc7184;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git Add NULL at the end of array. [Issue#] N/A [Bug] Lack of NULL at the end of array may cause segmentation fault. [Cause] N/A [Solution] N/A [Verification] Build, run tests. Change-Id: Ie834aab741807bbe8b9974b82adea5fca0ce767a --- diff --git a/tests/libprivilege-control-tests/test_cases.cpp b/tests/libprivilege-control-tests/test_cases.cpp index f738e772..8526c5bc 100644 --- a/tests/libprivilege-control-tests/test_cases.cpp +++ b/tests/libprivilege-control-tests/test_cases.cpp @@ -586,7 +586,7 @@ RUNNER_TEST(privilege_control11_add_api_feature) result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[4].c_str(), test5, NULL, 0); RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result); - const char *test6[] = { "-malformed malformed rwxat" }; + const char *test6[] = { "-malformed malformed rwxat", NULL }; result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[5].c_str(), test6, NULL, 0); RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result); @@ -614,7 +614,7 @@ RUNNER_TEST(privilege_control11_add_api_feature) result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[9].c_str(), test10, NULL, 0); RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result); - const char *test11[] = { "Sub::sjE,ct ~APP~ a-RwXL", NULL}; // TODO This fails. + const char *test11[] = { "Sub::sjE,ct ~APP~ a-RwXL", NULL }; // TODO This fails. result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[10].c_str(), test11, NULL, 0); RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result); @@ -630,7 +630,7 @@ RUNNER_TEST(privilege_control11_add_api_feature) RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result); // empty group ids - const char *test13[] = { "~APP~ b a",NULL }; + const char *test13[] = { "~APP~ b a", NULL}; result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[12].c_str(), test13,(const gid_t[]) {0,1,2},0); RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result); result = file_exists(OSP_BLAHBLAH_DAC[12].c_str());