fixed svace issues 72/317172/3 tizen_9.0
authorSejun Park <sejun79.park@samsung.com>
Thu, 26 Dec 2024 08:45:25 +0000 (17:45 +0900)
committerSejun Park <sejun79.park@samsung.com>
Fri, 27 Dec 2024 04:35:38 +0000 (13:35 +0900)
Change-Id: I508dea3465d927121bc2eb7fde5e6ac7c645bc3f

plugins/dependency-default/src/dependency_default_button.cpp
src/service_ipc_dbus.cpp

index 0b0c856cb86edd87515a88d63031baa215f693ab..59c8038ab63f90efdef9c3dedc5523ae0865456b 100644 (file)
@@ -31,7 +31,7 @@ static Eina_Bool _key_down_cb(void* data, int type, void* event)
        if (ev) {
                LOGD("KEY[%s], type[%d]", ev->keyname, type);
 
-               if (ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY)) == 0 ) {
+               if (ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY) + 1) == 0 ) {
                        chrono::time_point<chrono::system_clock> current_time_point;
                        current_time_point = chrono::system_clock::now();
                        auto diff = current_time_point - g_last_key_pressed;
@@ -57,7 +57,7 @@ static Eina_Bool _key_up_cb(void* data, int type, void* event)
                LOGD("KEY[%s], type[%d]", ev->keyname, type);
 
                if (g_voice_key_pressed &&
-                       ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY)) == 0) {
+                       ev->keyname && strncmp(ev->keyname, VOICE_KEY, strlen(VOICE_KEY) + 1) == 0) {
                        chrono::time_point<chrono::system_clock> current_time_point;
                        current_time_point = chrono::system_clock::now();
                        auto diff = current_time_point - g_last_key_pressed;
index fa51a915bb0a7a2dfbc5ab40d387a9c2f1db6d2d..54fbb152b362b44aacde8e8510143dfdbc599651 100644 (file)
@@ -64,7 +64,7 @@ static void message_port_cb(int local_port_id,
        bundle_get_str(message, "command", &command);
        if (command) {
                const char *szStartStreamingCommand = "start_streaming_current_utterance";
-               if (strncmp(command, szStartStreamingCommand, strlen(szStartStreamingCommand)) == 0) {
+               if (strncmp(command, szStartStreamingCommand, strlen(szStartStreamingCommand) + 1) == 0) {
                        MAS_LOGE("AP sent start streaming request");
                        observer->on_ap_start_streaming_audio_data(std::string{remote_app_id},
                                MA_AUDIO_STREAMING_DATA_TYPE_CURRENT_UTTERANCE);