From 8f38291c998ef064ad20770ec7c3cf655ca014f1 Mon Sep 17 00:00:00 2001 From: Manasij Sur Roy Date: Mon, 16 May 2016 15:55:10 +0530 Subject: [PATCH] SVACE issue fix Change-Id: I608bc336a8cb8f76b259a1a1886bf802038b7177 Signed-off-by: Manasij Sur Roy --- server/fido_server.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/server/fido_server.c b/server/fido_server.c index fa7285b..c940e7d 100755 --- a/server/fido_server.c +++ b/server/fido_server.c @@ -837,6 +837,14 @@ _discover_response_cb_for_process(int tz_error_code, int error_code, GList *avai return; } + if (cb_data->uaf_req->header->operation == NULL) { + _ERR("op field missing in uaf json message"); + + _send_process_response(cb_data, FIDO_ERROR_PROTOCOL_ERROR, NULL); + + return; + } + _INFO("cb_data->type = [%d]", cb_data->type); GList *available_authenticators_full = g_list_first(available_authenticators); @@ -845,10 +853,7 @@ _discover_response_cb_for_process(int tz_error_code, int error_code, GList *avai _INFO("_PROCESS_TYPE_CHECK_POLICY"); - if (cb_data->uaf_req->header->operation != NULL) - _INFO("operation = [%s]", cb_data->uaf_req->header->operation); - else - _ERR("operation = [NULL]"); + _INFO("operation = [%s]", cb_data->uaf_req->header->operation); if ((strcmp(cb_data->uaf_req->header->operation, _UAF_OPERATION_NAME_KEY_REG) == 0) || ((strcmp(cb_data->uaf_req->header->operation, _UAF_OPERATION_NAME_KEY_AUTH) == 0))) { -- 2.7.4