ports/139148: multimedia/dvdauthor: progress estimation bug in dvdunauthor

Nate Eldredge nate at thatsmathematics.com
Sat Sep 26 02:50:02 UTC 2009


>Number:         139148
>Category:       ports
>Synopsis:       multimedia/dvdauthor: progress estimation bug in dvdunauthor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 26 02:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list