From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 27 14:30:07 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A74C106566C for ; Fri, 27 Jul 2012 14:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 518A88FC29 for ; Fri, 27 Jul 2012 14:30:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6REU7WG059285 for ; Fri, 27 Jul 2012 14:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6REU7J8059284; Fri, 27 Jul 2012 14:30:07 GMT (envelope-from gnats) Resent-Date: Fri, 27 Jul 2012 14:30:07 GMT Resent-Message-Id: <201207271430.q6REU7J8059284@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Fabian Keil Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA13E106566C for ; Fri, 27 Jul 2012 14:22:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B44A08FC12 for ; Fri, 27 Jul 2012 14:22:59 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q6REMxMT013568 for ; Fri, 27 Jul 2012 14:22:59 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q6REMxMh013567; Fri, 27 Jul 2012 14:22:59 GMT (envelope-from nobody) Message-Id: <201207271422.q6REMxMh013567@red.freebsd.org> Date: Fri, 27 Jul 2012 14:22:59 GMT From: Fabian Keil To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/170212: [PATCH] Update sysutils/dvdbackup from 0.4.1 to 0.4.2 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2012 14:30:07 -0000 >Number: 170212 >Category: ports >Synopsis: [PATCH] Update sysutils/dvdbackup from 0.4.1 to 0.4.2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Jul 27 14:30:06 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Fabian Keil >Release: HEAD >Organization: >Environment: FreeBSD r500.local 10.0-CURRENT FreeBSD 10.0-CURRENT #467 r+44f3512: Sun Jul 22 01:35:49 CEST 2012 fk@r500.local:/usr/obj/usr/src/sys/ZOEY amd64 >Description: The attached patch updates sysutils/dvdbackup from 0.4.1 to 0.4.2. It also fixes a segfault when mirroring a DVD fails. The fix has already been submitted upstream. I took the liberty to set DEFAULT_DVD_DEVICE to /dev/cd0, which is probably more common than /dev/acd0 nowadays. The upstream Changes according to http://dvdbackup.sourceforge.net/: ########### New Features: Added new command line option -p, --progress: Print progress report while copying from the DVD; thanks to flipflip for the patch. Added new translations from Launchpad: Danish (da), English (United Kingdom) (en_GB), Estonian (et), Portuguese (pt), Slovak (sk), Turkish (tr) New complete translation: English (United Kingdom) (en_GB), French (fr), Italian (it), Slovak (sk) Changes: Convert DVD title to lower case, but let every word in the title start with an upper case letter and replace underscores with spaces. Bug fixes: Print the correct vob file name in which the read error happens. Thanks to Kolja Nowak for the patch. (Closes: #585560, LP: #648752) Fix DVD title detection on FreeBSD. Thanks to Emanuel Haupt. Fix copying of fragmented chapters. Thanks to Christian Kuehnke for the patch. (LP: #648920) ########### >How-To-Repeat: One way to reproduce the crash is to try mirroring a DVD while the drive is empty. Trying to mirror a DVD with unreadable IFO files "works" as well. >Fix: Patch attached with submission follows: >From ec0175a143a4ada39a76959a1d3417570a876b25 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 27 Jul 2012 14:05:57 +0200 Subject: [PATCH 2/2] Update sysutils/dvdbackup to 0.4.2 While at it set DEFAULT_DVD_DEVICE to /dev/cd0 and fix a segfault when mirroring the disc fails. --- sysutils/dvdbackup/Makefile | 5 +- sysutils/dvdbackup/distinfo | 4 +- sysutils/dvdbackup/files/patch-src::dvdbackup.c | 66 +++++++++++------------ 3 files changed, 34 insertions(+), 41 deletions(-) diff --git sysutils/dvdbackup/Makefile sysutils/dvdbackup/Makefile index 95d5775..dc4925b 100644 --- sysutils/dvdbackup/Makefile +++ sysutils/dvdbackup/Makefile @@ -6,8 +6,7 @@ # PORTNAME= dvdbackup -PORTVERSION= 0.4.1 -PORTREVISION= 2 +PORTVERSION= 0.4.2 CATEGORIES= sysutils multimedia MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} @@ -27,7 +26,7 @@ LDFLAGS+= -L${LOCALBASE}/lib MAN1= dvdbackup.1 PORTDOCS= NEWS README -DEFAULT_DVD_DEVICE?= /dev/acd0 +DEFAULT_DVD_DEVICE?= /dev/cd0 .if !defined(WITHOUT_NLS) USE_GETTEXT= yes diff --git sysutils/dvdbackup/distinfo sysutils/dvdbackup/distinfo index 70eca05..6c3e308 100644 --- sysutils/dvdbackup/distinfo +++ sysutils/dvdbackup/distinfo @@ -1,2 +1,2 @@ -SHA256 (dvdbackup-0.4.1.tar.gz) = ac9138b3265ef7f113d139e68130663937ce25322ae00922f74bab55aa63347b -SIZE (dvdbackup-0.4.1.tar.gz) = 232885 +SHA256 (dvdbackup-0.4.2.tar.gz) = 0a37c31cc6f2d3c146ec57064bda8a06cf5f2ec90455366cb250506bab964550 +SIZE (dvdbackup-0.4.2.tar.gz) = 267049 diff --git sysutils/dvdbackup/files/patch-src::dvdbackup.c sysutils/dvdbackup/files/patch-src::dvdbackup.c index 5c509eb..09df013 100644 --- sysutils/dvdbackup/files/patch-src::dvdbackup.c +++ sysutils/dvdbackup/files/patch-src::dvdbackup.c @@ -1,42 +1,36 @@ ---- src/dvdbackup.c.orig 2010-09-16 22:10:04.307951355 +0200 -+++ src/dvdbackup.c 2010-09-16 22:19:49.112413564 +0200 -@@ -99,7 +99,8 @@ +From 174f78e556d83458e34558a95cebd4d1d0960818 Mon Sep 17 00:00:00 2001 +From: Fabian Keil +Date: Tue, 10 Jul 2012 19:12:13 +0200 +Subject: [PATCH] Keep the _dvd opened if DVDGetFileSet() fails in + DVDMirrorTitleSet() or DVDMirror() + +The _dvd is always closed in main() and doing it twice +results in double frees and depending on the malloc +options used segmentation faults. +--- + src/dvdbackup.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git src/dvdbackup.c src/dvdbackup.c +index 1ac96a5..ad411ea 100644 +--- src/dvdbackup.c ++++ src/dvdbackup.c +@@ -1547,7 +1547,6 @@ int DVDMirror(dvd_reader_t * _dvd, char * targetdir,char * title_name, read_erro - - static int CheckSizeArray(const int size_array[], int reference, int target) { -- if ( (size_array[reference]/size_array[target] == 1) && -+ if ( size_array[target] && -+ (size_array[reference]/size_array[target] == 1) && - ((size_array[reference] * 2 - size_array[target])/ size_array[target] == 1) && - ((size_array[reference]%size_array[target] * 3) < size_array[reference]) ) { - /* We have a dual DVD with two feature films - now let's see if they have the same amount of chapters*/ -@@ -1264,7 +1265,7 @@ - - /* Seek to title of first track, which is at (track_no * 32768) + 40 */ - -- if ( 32808 != lseek(filehandle, 32808, SEEK_SET) ) { -+ if ( 32768 != lseek(filehandle, 32768, SEEK_SET) ) { - close(filehandle); - fprintf(stderr, _("Cannot seek DVD device %s - check your DVD device\n"), device); + title_set_info = DVDGetFileSet(_dvd); + if (!title_set_info) { +- DVDClose(_dvd); return(1); -@@ -1272,10 +1273,16 @@ + } - /* Read the DVD-Video title */ +@@ -1574,7 +1573,6 @@ int DVDMirrorTitleSet(dvd_reader_t * _dvd, char * targetdir,char * title_name, i + title_set_info = DVDGetFileSet(_dvd); -- if ( 32 != read(filehandle, title, 32)) { -- close(filehandle); -- fprintf(stderr, _("Cannot read title from DVD device %s\n"), device); -- return(1); -+#define DVD_SEC_SIZ 2048 -+ { -+ char tempBuf[ DVD_SEC_SIZ ]; -+ -+ if (DVD_SEC_SIZ != read(filehandle, tempBuf, DVD_SEC_SIZ)) { -+ close(filehandle); -+ fprintf(stderr, _("Cannot read title from DVD device %s\n"), device); -+ return(1); -+ } -+ snprintf( title, 32, "%s", tempBuf + 40 ); + if (!title_set_info) { +- DVDClose(_dvd); + return(1); } - /* Terminate the title string */ +-- +1.7.10.3 + -- 1.7.10.3 >Release-Note: >Audit-Trail: >Unformatted: