From 5f18845742a340ee755a35a6430a1c1e6fa6e717 Mon Sep 17 00:00:00 2001 From: Amit Purwar Date: Mon, 3 Feb 2020 11:22:09 +0530 Subject: [PATCH] Fix coverty issue 1097769 for strtok_r Change-Id: I13650fdbc20568f0b3c82eb388fd8a7437d9e1d2 Signed-off-by: Amit Purwar --- ag-agent/bluetooth-ag-agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ag-agent/bluetooth-ag-agent.c b/ag-agent/bluetooth-ag-agent.c index 957fdf7..71d6b1c 100644 --- a/ag-agent/bluetooth-ag-agent.c +++ b/ag-agent/bluetooth-ag-agent.c @@ -2792,7 +2792,7 @@ static gboolean __bt_ag_agent_is_device_vr_blacklisted(const char *lap_addr) rewind(fp); - buffer = g_malloc0(sizeof(char) * size); + buffer = g_malloc0((sizeof(char) * size) + 1); if (buffer == NULL) { ERR("g_malloc0 is failed"); fclose(fp); -- 2.7.4