From 82979ac9b4cd3acaa43854121d3b66cad9b2c2c6 Mon Sep 17 00:00:00 2001 From: chakradhar Date: Fri, 3 May 2019 11:53:23 +0530 Subject: [PATCH] heap buffer overflow fixed Change-Id: Ieb868278505ea357827db18330079898b86a80a2 Signed-off-by: chakradhar --- server/fido_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/fido_server.c b/server/fido_server.c index d1b3347..25f5c7d 100755 --- a/server/fido_server.c +++ b/server/fido_server.c @@ -160,7 +160,7 @@ _asm_get_info_cb(GList *asm_resp_list, void *user_data) int i = 0; int str_list_len = g_list_length(asm_resp_list); GList *asm_resp_list_iter = g_list_first(asm_resp_list); - char **asm_resp_json_arr = calloc(str_list_len, sizeof(int)); + char **asm_resp_json_arr = calloc(str_list_len + 1, sizeof(int)); if (asm_resp_json_arr != NULL) { while (asm_resp_list_iter != NULL) { -- 2.7.4