Fix the 64bit build error 92/240392/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 6 Aug 2020 04:54:59 +0000 (13:54 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 6 Aug 2020 04:55:31 +0000 (13:55 +0900)
tests/menu.c:129:36: error: '%s' directive output may be truncated writing up to 99 bytes into a region of size 55 [-Werror=format-truncation=]

Change-Id: I4b7bf9e9a4f14c53d8a22bb3557cc2c33e0f0517
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
tests/menu.c

index 20014bb937b45d6386ad27dbd169b5c651b3334d..276b301cf75a8a6592958aae867df7dce56b34d4 100644 (file)
@@ -126,7 +126,7 @@ static void _show_menu(MManager *m, struct menu_data menu[])
 
                memset(title_buf, 0, 256);
                if (item->title) {
-                       snprintf(title_buf, MAX_TITLE, "%s", item->title);
+                       snprintf(title_buf, sizeof(title_buf), "%s", item->title);
 
                        if (strlen(item->title) >= MAX_TITLE) {
                                title_buf[MAX_TITLE - 2] = '.';