#include <regex.h>
#include <sys/stat.h>
#include <libcitadel.h>
-#include "md5.h"
#include "ctdl_module.h"
#include "citserver.h"
#include "control.h"
mptr = Buffer;
upper_bound = Buffer + Length;
+ if (msgnum <= 0) {
+ return NULL;
+ }
/* Parse the three bytes that begin EVERY message on disk.
* The first is always 0xFF, the on-disk magic number.
}
if (!strcasecmp(cbtype, "text/html")) {
- ptr = html_to_ascii(content, length, 80, 0);
+ ptr = html_to_ascii(content, length, 80);
wlen = strlen(ptr);
client_write(ptr, wlen);
if ((wlen > 0) && (ptr[wlen-1] != '\n')) {
}
/* Unescape SMTP-style input of two dots at the beginning of the line */
- if ((dotdot) &&
- (StrLength(LineBuf) == 2) &&
- (!strcmp(ChrPtr(LineBuf), "..")))
- {
+ if ((dotdot) && (StrLength(LineBuf) > 1) && (ChrPtr(LineBuf)[0] == '.')) {
StrBufCutLeft(LineBuf, 1);
}
-
StrBufAppendBuf(Message, LineBuf, 0);
}