X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmsgbase.c;h=2730f8ec3a4de366179d712988a663883aebbb3a;hp=7f6b7c9dabecf7477a213aecbea99a1f67e1af03;hb=cbdfd90e8f5dae213ce649e6e02d913a45203197;hpb=421c6e0bce6917ae9d09ae066c77fb58b964c399 diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 7f6b7c9da..2730f8ec3 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -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.