1 Backport of upstream https://review.spdk.io/gerrit/c/spdk/spdk/+/10300
2 --- a/app/spdk_top/spdk_top.c
3 +++ b/app/spdk_top/spdk_top.c
4 @@ -1012 +1012 @@ print_max_len(WINDOW *win, int row, uint16_t col, uint16_t max_len, enum str_ali
5 - mvwprintw(win, row, col, tmp_str);
6 + mvwprintw(win, row, col, "%s", tmp_str);
7 @@ -1944 +1944 @@ display_thread(struct rpc_thread_info *thread_info)
8 - mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 6, "%" PRIu64,
9 + mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 6, "%d",
10 @@ -1949 +1949 @@ display_thread(struct rpc_thread_info *thread_info)
11 - mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, idle_time);
12 + mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, "%s", idle_time);
13 @@ -1951 +1951 @@ display_thread(struct rpc_thread_info *thread_info)
14 - mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, busy_time);
15 + mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, "%s", busy_time);
16 @@ -1954 +1954 @@ display_thread(struct rpc_thread_info *thread_info)
17 - mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, idle_time);
18 + mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, "%s", idle_time);
19 @@ -1956 +1956 @@ display_thread(struct rpc_thread_info *thread_info)
20 - mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, busy_time);
21 + mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, "%s", busy_time);
22 @@ -2111 +2111 @@ show_core(uint8_t current_page)
23 - mvwprintw(core_win, 5, CORE_WIN_FIRST_COL + 20, idle_time);
24 + mvwprintw(core_win, 5, CORE_WIN_FIRST_COL + 20, "%s", idle_time);
25 @@ -2118 +2118 @@ show_core(uint8_t current_page)
26 - mvwprintw(core_win, 7, CORE_WIN_FIRST_COL + 20, busy_time);
27 + mvwprintw(core_win, 7, CORE_WIN_FIRST_COL + 20, "%s", busy_time);
28 @@ -2124 +2124 @@ show_core(uint8_t current_page)
29 - mvwprintw(core_win, i + 10, 1, core_info->threads.thread[i].name);
30 + mvwprintw(core_win, i + 10, 1, "%s", core_info->threads.thread[i].name);
31 @@ -2137 +2137 @@ show_core(uint8_t current_page)
32 - mvwprintw(core_win, i + 10, 1, core_info->threads.thread[i].name);
33 + mvwprintw(core_win, i + 10, 1, "%s", core_info->threads.thread[i].name);
34 @@ -2214 +2214 @@ show_poller(uint8_t current_page)
35 - mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL,
36 + mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL, "%s",
37 @@ -2216 +2216 @@ show_poller(uint8_t current_page)
38 - mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL + 23, poller->thread_name);
39 + mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL + 23, "%s", poller->thread_name);
40 @@ -2231 +2231 @@ show_poller(uint8_t current_page)
41 - mvwprintw(poller_win, 4, POLLER_WIN_FIRST_COL + 23, poller_period);
42 + mvwprintw(poller_win, 4, POLLER_WIN_FIRST_COL + 23, "%s", poller_period);
43 @@ -2264 +2264 @@ print_bottom_error_message(char *msg)
44 - mvprintw(g_max_row - 1, g_max_col - strlen(msg) - 2, msg);
45 + mvprintw(g_max_row - 1, g_max_col - strlen(msg) - 2, "%s", msg);
46 @@ -2434 +2434 @@ show_stats(pthread_t *data_thread)
47 - mvprintw(g_max_row - 1, 1, current_page_str);
48 + mvprintw(g_max_row - 1, 1, "%s", current_page_str);