Merge branch 'filestat1' of https://github.com/kusumi/fio
[fio.git] / gclient.c
index 64324177ef1a8bb747346adf12f65a2e1a1de2b9..d8dc62d28aca8f6645953ef06b146cccbe995287 100644 (file)
--- a/gclient.c
+++ b/gclient.c
@@ -330,7 +330,7 @@ static void gfio_update_thread_status_all(struct gui *ui, char *status_message,
        static char message[100];
        const char *m = message;
 
-       strncpy(message, sizeof(message), "%s", status_message);
+       snprintf(message, sizeof(message), "%s", status_message);
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ui->thread_status_pb), m);
        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ui->thread_status_pb), perc / 100.0);
        gtk_widget_queue_draw(ui->window);