Read boundaries cause body checksum mismatch

Richard Lyons frob-dcc@webcentral.com.au
Sun Jul 4 15:37:17 UTC 2004


If a message has a MIME boundary that falls across a read boundary,
dcc_ck_body() only checksums the portion after the read.  It's most
noticable when using dccifd; if a client can't keep the pipe full and the
message has several parts, dccifd may compute different body checksums
for multiple submissions of the same message.

This little patch seems to work for me.

--- dcc-dccd-1.2.50.orig/dcclib/ckbody.c	2004-05-29 11:14:14.000000000 +1000
+++ dcc-dccd-1.2.50/dcclib/ckbody.c	2004-07-04 23:50:05.000000000 +1000
@@ -375,7 +375,9 @@
 			/* Body checksum the boundary */
 			cks->mp_st = CK_MP_ST_BND;
 			matched_len = ++cp - cmp;
-			decode_sum(cks, cmp, matched_len);
+			decode_sum(cks, bndp->bnd, bndp->bnd_len);
+			if (bndp->cmp_len > bndp->bnd_len)
+				decode_sum(cks, "--", 2);
 			cmp = sum = cp;
 
 			/* Forget inner entities */

Rick.



More information about the DCC mailing list

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