NetBSD Problem Report #18422

Received: (qmail 29920 invoked by uid 605); 26 Sep 2002 04:03:11 -0000
Message-Id: <>
Date: Thu, 26 Sep 2002 13:03:06 +0900 (JST)
Subject: distribute:write_index() is called too early.
X-Send-Pr-Version: 3.95

>Number:         18422
>Category:       pkg
>Synopsis:       pkgsrc/mail/distribute: write_index() is called too early.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    enami
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 26 04:04:00 +0000 2002
>Last-Modified:  Fri Jan 10 21:57:55 +0000 2003
>Originator:     enami tsugutomo
>Release:        NetBSD 1.6G
	Sony Corp.
System: NetBSD 1.6G NetBSD 1.6G (PARITY_ERROR.UP.PROF) #315: Wed Sep 4 11:02:52 JST 2002 i386
Architecture: i386
Machine: i386
	The function write_index() in distribute.c (in pkgsrc/mail/distribute)
	uses global variable `bodysum' but is called before the check sum
	is calculated.  As a result, check sum written in INDEX file is always
	zero and the program `archive' may barf as follows:

Sep 26 11:34:47 email0 archive[5067]: body checksum mismatch: incoming: 1228

	UTSL is easier way.
	% make patch			# make sure patch.20.gz is applied.
	% view work.i386/distribute-pl19/distribute.c
	and see how bodysum is updated and write_index() is called.
	Call the write_index after the sum is calclated (but I'm not sure
	the origianl intention of the change in patch.20.gz).
State-Changed-From-To: open->feedback 
State-Changed-By: wiz 
State-Changed-When: Thu Sep 26 01:17:01 PDT 2002 
Wouldn't the original authors be a better place to report this, 
especially if you're unclear about parts of the source? 
State-Changed-From-To: feedback->open 
State-Changed-By: wiz 
State-Changed-When: Fri Jan 10 13:57:36 PST 2003 

Responsible-Changed-From-To: pkg-manager->enami 
Responsible-Changed-By: wiz 
Responsible-Changed-When: Fri Jan 10 13:57:36 PST 2003 
Feel free to commit a fix. 

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.