From ee387adb49ae16824796827e42cdb4efb7754cb9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 19 Oct 2019 05:57:32 +0000 Subject: [PATCH] pivot-table: Use ctime_r() instead of ctime(), for thread safety. --- src/output/pivot-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/pivot-table.c b/src/output/pivot-table.c index ba3d98c916..72a158baaa 100644 --- a/src/output/pivot-table.c +++ b/src/output/pivot-table.c @@ -1383,7 +1383,8 @@ pivot_table_dump (const struct pivot_table *table, int indentation) if (table->date) { indent (indentation); - printf ("date: %s", ctime (&table->date)); /* XXX thread unsafe */ + char buf[26]; + printf ("date: %s", ctime_r (&table->date, buf)); } indent (indentation); -- 2.30.2