* persistantly handle the bufferlengths for dates; snprintf doesn't terminate strings...
[citadel.git] / webcit / msg_renderers.c
index b401ea7595a6dc6f1aa0f545e6fd935a18c1e3cb..5481cdcebfea03c35a0610ea3cd63e534f0d8acd 100644 (file)
@@ -441,7 +441,7 @@ void tmplput_MAIL_SUMM_DATE_BRIEF(StrBuf *Target, WCTemplputParams *TP)
 {
        char datebuf[64];
        message_summary *Msg = (message_summary*) CTX;
-       webcit_fmt_date(datebuf, Msg->date, DATEFMT_BRIEF);
+       webcit_fmt_date(datebuf, 64, Msg->date, DATEFMT_BRIEF);
        StrBufAppendBufPlain(Target, datebuf, -1, 0);
 }
 
@@ -449,13 +449,13 @@ void tmplput_MAIL_SUMM_DATE_FULL(StrBuf *Target, WCTemplputParams *TP)
 {
        char datebuf[64];
        message_summary *Msg = (message_summary*) CTX;
-       webcit_fmt_date(datebuf, Msg->date, DATEFMT_FULL);
+       webcit_fmt_date(datebuf, 64, Msg->date, DATEFMT_FULL);
        StrBufAppendBufPlain(Target, datebuf, -1, 0);
 }
 void tmplput_MAIL_SUMM_DATE_NO(StrBuf *Target, WCTemplputParams *TP)
 {
        message_summary *Msg = (message_summary*) CTX;
-       StrBufAppendPrintf(Target, "%ld", Msg->date, 0);
+       StrBufAppendPrintf(Target, 64, "%ld", Msg->date, 0);
 }