Pass missing parameter to real function 91/291591/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 19 Apr 2023 02:43:53 +0000 (11:43 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Wed, 19 Apr 2023 02:43:53 +0000 (11:43 +0900)
- Issue:
After reprepare_on_demand(), the client handle is missing.

- Solution:
Previous code does not pass all neccessary parameters, so the function
can write value into arbitrary pointer. And this pointer access can
cause critical memory crash. Thus, this patch fixes the code to make
sure the tts_ipc module pass all proper parameters to actual function in
tts_dbus and tts_tidl module.

Change-Id: I2276c05e3b29f070664b8fad607cc1d13ddb9cee
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts_ipc.c

index 8e75326fbadc426074696fbb9ce5a48b142c6398..5229a560da109d7ca9c3926b8bf9c691482864ce 100644 (file)
@@ -136,7 +136,7 @@ int tts_ipc_request_initialize(unsigned int uid, tts_mode_e mode, tts_playing_mo
        RETVM_IF(false == tts_client_is_valid_uid(uid), TTS_ERROR_INVALID_PARAMETER, "Fail to get tts_client with uid(%u)", uid);
        RETVM_IF(NULL == g_vtable, TTS_ERROR_OPERATION_FAILED, "[ERROR] IPC method is not set");
 
-       return g_vtable[REQUEST_INITIALIZE](uid, mode, registered_event_mask, service_state, credential_needed);
+       return g_vtable[REQUEST_INITIALIZE](uid, mode, playing_mode, registered_event_mask, service_state, credential_needed);
 }
 
 int tts_ipc_request_finalize(unsigned int uid)