From f8e94ec86428b8cce9c616e286106c20491ef3e2 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Mon, 21 May 2012 09:55:26 +0900 Subject: [PATCH] allocate in exact size Change-Id: I0a9d760ebd10f3655f116953a2ed353f992ef508 --- connectivity/source/commontools/CommonTools.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 63a31e1a1f78..3fbafceaef95 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -147,7 +147,7 @@ namespace connectivity //------------------------------------------------------------------ rtl::OUString toDateTimeString(const ::com::sun::star::util::DateTime& rDateTime) { - sal_Char s[21]; + sal_Char s[20]; snprintf(s, sizeof(s), "%04d-%02d-%02d %02d:%02d:%02d", @@ -157,7 +157,7 @@ namespace connectivity (int)rDateTime.Hours, (int)rDateTime.Minutes, (int)rDateTime.Seconds); - s[20] = 0; + s[19] = 0; return rtl::OUString::createFromAscii(s); }