fix warning stringop-truncation 94/221094/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 27 Dec 2019 05:31:06 +0000 (14:31 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 27 Dec 2019 05:32:42 +0000 (14:32 +0900)
Change-Id: I73d11ce3ca4904d307d3764f7c26f40f3de2a8f8

src/tbm_surface_internal.c

index 51c05a7..50ae206 100644 (file)
@@ -2185,7 +2185,7 @@ static char *_tbm_surface_internal_get_keys(tbm_surface_h surface)
                memset(temp_key, 0x00, KEY_LEN + 1);
                bo = surf->bos[i];
                snprintf(temp_key, KEY_LEN, "_%d", tbm_bo_export(bo));
-               strncat(keys, temp_key, KEY_LEN);
+               strncat(keys, temp_key, KEY_LEN + 1);
        }
 
        _tbm_surface_mutex_unlock();