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
diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h
index 26d2b0f..e077923 100644
--- a/lib/cpp/src/Thrift.h
+++ b/lib/cpp/src/Thrift.h
@@ -65,7 +65,7 @@
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;