X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmsgbase.c;fp=citadel%2Fmsgbase.c;h=1fff6dc474d891ef3a838937d1d109f877a3f87f;hp=776680b6df7cd5dd04f16bd04979fe23cf07cff6;hb=b498f06a2b5242976387ca04ef9712e00f81dbb7;hpb=b10ebd5b1e010488870853620a35d704a3e36f82 diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 776680b6d..1fff6dc47 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -1129,6 +1129,13 @@ struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body) ret->cm_anon_type = *mptr++; /* Anon type byte */ ret->cm_format_type = *mptr++; /* Format type byte */ + + if (dmsgtext->ptr[dmsgtext->len - 1] != '\0') + { + MSG_syslog(LOG_ERR, "CtdlFetchMessage(%ld, %d) Forcefully terminating message!!\n", msgnum, with_body); + dmsgtext->ptr[dmsgtext->len - 1] = '\0'; + } + /* * The rest is zero or more arbitrary fields. Load them in. * We're done when we encounter either a zero-length field or