From d28ce1035b6880f73a39e993280c7358e114d88f Mon Sep 17 00:00:00 2001 From: David Reiss Date: Thu, 21 May 2009 02:28:14 +0000 Subject: [PATCH] cpp: Fix an OpenBSD compilation error that appears to be a real bug The (Linux) man page for ctime_r states pretty clearly that the buffer it uses must have space for at least 26 characters. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776925 13f79535-47bb-0310-9956-ffa450edef68 --- lib/cpp/src/Thrift.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h index 26d2b0fc..e0779233 100644 --- a/lib/cpp/src/Thrift.h +++ b/lib/cpp/src/Thrift.h @@ -65,7 +65,7 @@ class TOutput { inline static void errorTimeWrapper(const char* msg) { time_t now; - char dbgtime[25]; + char dbgtime[26]; time(&now); ctime_r(&now, dbgtime); dbgtime[24] = 0; -- 2.17.1