If library connect to service with no init function, coroipcs will try to dereference NULL pointer. Now we correctly return error code CS_ERR_NOT_EXIST.
Signed-off-by: Jan Friesse <[email protected]> --- exec/coroipcs.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exec/coroipcs.c b/exec/coroipcs.c index dbafb18..7b2b7ad 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -1617,13 +1617,14 @@ int coroipcs_handler_dispatch ( req_setup = (mar_req_setup_t *)conn_info->setup_msg; /* * Is the service registered ? + * Has service init function ? */ - if (api->service_available (req_setup->service) == 0) { + if (api->service_available (req_setup->service) == 0 || + api->init_fn_get (req_setup->service) == NULL) { req_setup_send (conn_info, CS_ERR_NOT_EXIST); ipc_disconnect (conn_info); return (0); } - #if _POSIX_THREAD_PROCESS_SHARED < 1 conn_info->semkey = req_setup->semkey; #endif -- 1.6.2.5 _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
