4
4
*
5
5
* Portions Copyright (c) 2002-2009, PostgreSQL Global Development Group
6
6
*
7
- * $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.44 2009/01/0913:03:55 mha Exp $
7
+ * $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.45 2009/01/0914:07:00 mha Exp $
8
8
*
9
9
*-----------------------------------------------------------------------
10
10
*/
@@ -476,7 +476,7 @@ strftime_win32(char *dst, size_t dstlen, const wchar_t *format, const struct tm
476
476
477
477
encoding = GetDatabaseEncoding ();
478
478
479
- len = wcsftime (wbuf ,sizeof ( wbuf ) ,format ,tm );
479
+ len = wcsftime (wbuf ,MAX_L10N_DATA ,format ,tm );
480
480
if (len == 0 )
481
481
/* strftime call failed - return 0 with the contents of dst unspecified */
482
482
return 0 ;
@@ -492,7 +492,7 @@ strftime_win32(char *dst, size_t dstlen, const wchar_t *format, const struct tm
492
492
char * convstr = pg_do_encoding_conversion (dst ,len ,PG_UTF8 ,encoding );
493
493
if (dst != convstr )
494
494
{
495
- StrNCpy (dst ,convstr ,dstlen );
495
+ strlcpy (dst ,convstr ,dstlen );
496
496
len = strlen (dst );
497
497
}
498
498
}