to_char():  prevent writing beyond the allocated buffer
to_char():  prevent writing beyond the allocated buffer

Previously very long localized month and weekday strings could
overflow the allocated buffers, causing a server crash.

Reported and patch reviewed by Noah Misch.  Backpatch to all
supported versions.

Security: CVE-2015-0241

50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,50wu/gpdb,adam8157/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,50wu/gpdb,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,adam8157/gpdb,greenplum-db/gpdb,xinzweb/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,jmcatamney/gpdb,adam8157/gpdb,adam8157/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,lisakowen/gpdb,lisakowen/gpdb,jmcatamney/gpdb