From f1dfc5bc824b459877a0f3fe72a8a163dd89b53e Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 29 Sep 2016 20:59:20 +0900 Subject: [PATCH] increase the size for the null termination Change-Id: I7e2b00c41e65094cb0951e2aa636ab648c62d829 --- src/tbm_bufmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index 99721a8..17f45d6 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -1462,7 +1462,7 @@ tbm_bufmgr_debug_show(tbm_bufmgr bufmgr) snprintf(title, 255, "%s", "no surface refcnt width height bpp size n_b n_p flags format app_name "); if (!LIST_IS_EMPTY(&bufmgr->debug_key_list)) { LIST_FOR_EACH_ENTRY_SAFE(debug_old_data, debug_tmp, &bufmgr->debug_key_list, item_link) { - strncat(title, " ", 2); + strncat(title, " ", 3); strncat(title, debug_old_data->key, strlen(debug_old_data->key) + 1); } } @@ -1499,13 +1499,13 @@ tbm_bufmgr_debug_show(tbm_bufmgr bufmgr) if (!LIST_IS_EMPTY(&bufmgr->debug_key_list)) { LIST_FOR_EACH_ENTRY_SAFE(debug_old_data, debug_tmp, &bufmgr->debug_key_list, item_link) { - strncat(data, " ", 2); + strncat(data, " ", 3); value = _tbm_surface_internal_get_debug_data(surf, debug_old_data->key); if (value) strncat(data, value, strlen(value) + 1); else - strncat(data, "none", strlen("none") + 1); + strncat(data, "none", 5); } } TBM_DEBUG("%s\n", data); -- 2.7.4