aboutsummaryrefslogtreecommitdiff
path: root/src/procheader.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-17 10:02:26 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-17 10:02:26 +0000
commit959bdb992afe0d2964381255da7f7eab6aa9de61 (patch)
tree37d5b8594be5d15c91faa9e34525b6938e938650 /src/procheader.c
parent6127a936645cf2d2d4fcdfd1461f4d1f7268a3b7 (diff)
made every code conversion API allocate new memory.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@180 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/procheader.c')
-rw-r--r--src/procheader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/procheader.c b/src/procheader.c
index f88396cb..a3698b2c 100644
--- a/src/procheader.c
+++ b/src/procheader.c
@@ -779,7 +779,7 @@ void procheader_date_get_localtime(gchar *dest, gint len, const time_t timer)
{
struct tm *lt;
gchar *default_format = "%y/%m/%d(%a) %H:%M";
- gchar *tmp;
+ gchar *tmp, *buf;
Xalloca(tmp, len + 1, dest[0] = '\0'; return;);
@@ -790,5 +790,7 @@ void procheader_date_get_localtime(gchar *dest, gint len, const time_t timer)
else
strftime(tmp, len, default_format, lt);
- conv_localetodisp(dest, len, tmp);
+ buf = conv_localetodisp(tmp);
+ strncpy2(dest, buf, len);
+ g_free(buf);
}