dccifd do not compute Body checksum when the message body is under 30 bytes

Martin Pála Martin.Pala@oskar.cz
Mon Aug 22 16:02:39 UTC 2005


Hmm,

i found the place where it is caused (dcclib/ckbody.c):

--8<--
void
dcc_ck_body0_fin(DCC_GOT_CKS *cks)
{
        /* always generate the MD5 checksum so that grey listing has it */
        MD5Final(cks->sums[DCC_CK_BODY].sum, &cks->ctx_body.md5);

        if (cks->sums[DCC_CK_BODY].type != DCC_CK_BODY)
                return;

        if (cks->ctx_body.total < 30) {
                cks->sums[DCC_CK_BODY].type = DCC_CK_INVALID;
                return;
        }

        cks->sums[DCC_CK_BODY].rpt = 1;
        cks->flags |= DCC_CKS_HAVE_SUM;
}
--8<--


... however i don't understand why the checksum for body < 30 bytes is classified as invalid?


Thanks,
Martin




More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.