Suppress 'message 0 appears to be corrupted' log messages
[citadel.git] / citadel / msgbase.c
index 7f6b7c9dabecf7477a213aecbea99a1f67e1af03..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.