From f00aee65a640055aa6dd759c34a8708c9f205a44 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 12 Dec 2018 20:32:59 +0900 Subject: [PATCH] Add missing code to check NULL in autofill_service_set_terminate_received_cb Change-Id: Iba703e80ac0da84b4bcdf64f372766ae0aeef8e5 Signed-off-by: Jihoon Kim --- service_lib/autofill_service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service_lib/autofill_service.c b/service_lib/autofill_service.c index f81e778..f8106d4 100644 --- a/service_lib/autofill_service.c +++ b/service_lib/autofill_service.c @@ -636,6 +636,10 @@ EXPORT_API int autofill_service_unset_commited_cb(void) EXPORT_API int autofill_service_set_terminate_received_cb(autofill_service_terminate_received_cb callback, void *user_data) { + if (!callback) { + LOGW("[ERROR] Invalid parameter"); + return AUTOFILL_ERROR_INVALID_PARAMETER; + } g_autofill_service_terminate_received_cb = callback; g_autofill_service_terminate_received_data = user_data; -- 2.7.4