Suppress 'message 0 appears to be corrupted' log messages
authorArt Cancro <ajc@citadel.org>
Fri, 23 Nov 2018 19:34:46 +0000 (14:34 -0500)
committerArt Cancro <ajc@citadel.org>
Fri, 23 Nov 2018 19:34:46 +0000 (14:34 -0500)
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.