Suppress 'message 0 appears to be corrupted' log messages
[citadel.git] / citadel / msgbase.c
index a88a76369b5622251daf366d98fa0564bfd8b199..2730f8ec3a4de366179d712988a663883aebbb3a 100644 (file)
@@ -1109,6 +1109,9 @@ struct CtdlMessage *CtdlDeserializeMessage(long msgnum, int with_body, const cha
 
        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.
@@ -1308,7 +1311,7 @@ void fixed_output(char *name, char *filename, char *partnum, char *disp,
        }
 
        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')) {