From: Amit Purwar Date: Mon, 3 Feb 2020 05:52:09 +0000 (+0530) Subject: Fix coverty issue 1097769 for strtok_r X-Git-Tag: accepted/tizen/unified/20200210.131847~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f18845742a340ee755a35a6430a1c1e6fa6e717;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-agent.git Fix coverty issue 1097769 for strtok_r Change-Id: I13650fdbc20568f0b3c82eb388fd8a7437d9e1d2 Signed-off-by: Amit Purwar --- 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);