NetBSD Problem Report #18422

Received: (qmail 29920 invoked by uid 605); 26 Sep 2002 04:03:11 -0000
Message-Id: <200209260403.g8Q436F27392@parity-error.sm.sony.co.jp>
Date: Thu, 26 Sep 2002 13:03:06 +0900 (JST)
From: enami@sm.sony.co.jp
Sender: gnats-bugs-owner@netbsd.org
Reply-To: enami@netbsd.org
To: gnats-bugs@gnats.netbsd.org
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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 26 04:04:00 +0000 2002
>Closed-Date:    Thu May 25 05:14:06 +0000 2017
>Last-Modified:  Thu May 25 05:14:06 +0000 2017
>Originator:     enami tsugutomo
>Release:        NetBSD 1.6G
>Organization:
	Sony Corp.
>Environment:
System: NetBSD parity-error.sm.sony.co.jp 1.6G NetBSD 1.6G (PARITY_ERROR.UP.PROF) #315: Wed Sep 4 11:02:52 JST 2002 enami@memory-leak.sm.sony.co.jp:/a/compile/PARITY_ERROR.UP.PROF i386
Architecture: i386
Machine: i386
>Description:
	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

>How-To-Repeat:
	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.
>Fix:
	Call the write_index after the sum is calclated (but I'm not sure
	the origianl intention of the change in patch.20.gz).
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: wiz 
State-Changed-When: Thu Sep 26 01:17:01 PDT 2002 
State-Changed-Why:  
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 
State-Changed-Why:  


Responsible-Changed-From-To: pkg-manager->enami 
Responsible-Changed-By: wiz 
Responsible-Changed-When: Fri Jan 10 13:57:36 PST 2003 
Responsible-Changed-Why:  
Feel free to commit a fix. 
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/18422: mail/distribute: write_index() is called too early.
Date: Mon, 10 Aug 2015 06:34:48 +0000

 Looking at this, it seems that patch20, or at least that part of it,
 is just wrong.

 Is there an upstream for this package? The pkgsrc package doesn't
 appear to have been touched in any substantive way since it was first
 added in 1999.

 If there is no upstream, is the package worth maintaining? It is not
 very large and it should be fairly straightforward to wade into it and
 figure out what that change was supposed to do, and fix it properly;
 but it's only worth doing if anyone's going to actually use the
 results.

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 15 Aug 2016 11:31:25 +0000
State-Changed-Why:
I've applied the requested change.
Please check if it suffices.


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/18422 CVS commit: pkgsrc/mail/distribute
Date: Mon, 15 Aug 2016 11:30:32 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Mon Aug 15 11:30:32 UTC 2016

 Modified Files:
 	pkgsrc/mail/distribute: Makefile distinfo
 	pkgsrc/mail/distribute/patches: patch-ac

 Log Message:
 PR/18422: pkgsrc/mail/distribute: write_index() is called too early.
 Only call write_index() after calculating bodysum, otherwise it uses
 the initial value of 0.

 While I have not tested this patch myself, the need for it is clear.

 Patching in pkgsrc as this package does not have an upstream.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.30 -r1.31 pkgsrc/mail/distribute/Makefile
 cvs rdiff -u -r1.7 -r1.8 pkgsrc/mail/distribute/distinfo
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/mail/distribute/patches/patch-ac

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 25 May 2017 05:14:06 +0000
State-Changed-Why:
feedback timeout


>Unformatted:

NetBSD Home
NetBSD PR Database Search

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