From nobody@FreeBSD.org  Sat Sep 26 02:47:06 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DC10E106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Sep 2009 02:47:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id CAE138FC23
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Sep 2009 02:47:06 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8Q2l6TH016331
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Sep 2009 02:47:06 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n8Q2l6rH016330;
	Sat, 26 Sep 2009 02:47:06 GMT
	(envelope-from nobody)
Message-Id: <200909260247.n8Q2l6rH016330@www.freebsd.org>
Date: Sat, 26 Sep 2009 02:47:06 GMT
From: Nate Eldredge <nate@thatsmathematics.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: multimedia/dvdauthor: progress estimation bug in dvdunauthor
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         139148
>Category:       ports
>Synopsis:       multimedia/dvdauthor: progress estimation bug in dvdunauthor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 26 02:50:01 UTC 2009
>Closed-Date:    Sun Nov 06 16:03:30 UTC 2011
>Last-Modified:  Sun Nov 06 16:03:30 UTC 2011
>Originator:     Nate Eldredge
>Release:        7.1-RELEASE
>Organization:
>Environment:
FreeBSD vulcan.lan 7.1-RELEASE-p4 FreeBSD 7.1-RELEASE-p4 #0: Tue Mar 24 08:55:08 PDT 2009     root@vulcan.lan:/usr/obj/usr/src/sys/VULCAN  amd64

>Description:
dvdunauthor, from the multimedia/dvdauthor port, attempts to estimate the time remaining as it unauthors each title of a DVD.  Due to an integer overflow the times reported are bogus, often negative.
>How-To-Repeat:
Run dvdunauthor on a disc with a large title, and wait a few seconds.
>Fix:
Patch below.

Patch attached with submission follows:

--- work/dvdauthor-0.6.14/src/dvdunauthor.c	2009-09-25 19:41:37.000000000 -0700
+++ work-new/dvdauthor-0.6.14/src/dvdunauthor.c	2009-09-17 08:40:45.000000000 -0700
@@ -877,7 +877,7 @@
             if( rl > BIGBLOCKSECT ) rl = BIGBLOCKSECT;
             now=times(&tp);
             if( now-start>3*clkpsec && numsect>0 ) {
-                int rmn=(totalsect-numsect)*(now-start)/(numsect*clkpsec);
+                int rmn=((long long)(totalsect-numsect))*(now-start)/(numsect*clkpsec);
                 fprintf(stderr,"STAT: [%d] VOB %d, Cell %d (%d%%, %d:%02d remain)\r",i,cells[i].vob_id,cells[i].cell_id,(numsect*100+totalsect/2)/totalsect,rmn/60,rmn%60);
             } else
                 fprintf(stderr,"STAT: [%d] VOB %d, Cell %d (%d%%)\r",i,cells[i].vob_id,cells[i].cell_id,(numsect*100+totalsect/2)/totalsect);


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pb 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Sep 26 02:50:10 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139148 
Responsible-Changed-From-To: pb->freebsd-ports-bugs 
Responsible-Changed-By: tabthorpe 
Responsible-Changed-When: Fri Sep 16 00:06:07 UTC 2011 
Responsible-Changed-Why:  
Reassign to the heap 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139148 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sun Nov 6 16:03:29 UTC 2011 
State-Changed-Why:  
Submitter/Maintainer Feedback timeout. If this problem still exists, 
please feel free to follow-up this PR so that we can re-open it and find 
a solution for the problem. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139148 
>Unformatted:
