diff options
author | John Vogel <jvogel4@stny.rr.com> | 2013-11-30 23:50:29 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2013-12-02 00:58:16 -0600 |
commit | b8881e4293fb7719e79026d7fe56106fb72c8238 (patch) | |
tree | c811fd0c469f56956d0a1f39ef57611217999fb8 /multimedia/dvdbackup | |
parent | 31ca575f94ad4d9ff67e02c2b47cb165d7fa522f (diff) |
multimedia/dvdbackup: Updated for version 0.4.2.
New maintainer also...
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'multimedia/dvdbackup')
-rw-r--r-- | multimedia/dvdbackup/README | 5 | ||||
-rw-r--r-- | multimedia/dvdbackup/dvdbackup.SlackBuild | 68 | ||||
-rw-r--r-- | multimedia/dvdbackup/dvdbackup.info | 8 | ||||
-rw-r--r-- | multimedia/dvdbackup/patches/do_not_treat_automake_warnings_as_errors.patch | 13 | ||||
-rw-r--r-- | multimedia/dvdbackup/patches/remove_PATH_MAX_limitation.patch | 463 | ||||
-rw-r--r-- | multimedia/dvdbackup/slack-desc | 6 |
6 files changed, 540 insertions, 23 deletions
diff --git a/multimedia/dvdbackup/README b/multimedia/dvdbackup/README index 79c46676d19c..48ef05de8db6 100644 --- a/multimedia/dvdbackup/README +++ b/multimedia/dvdbackup/README @@ -1 +1,4 @@ -dvdbackup - simple commandline DVD backup software +dvdbackup is a tool to backup video DVDs from the command line. +It has the advantages of being small, fast, and easy to use. + +libdvdcss is optional but most likely desired. diff --git a/multimedia/dvdbackup/dvdbackup.SlackBuild b/multimedia/dvdbackup/dvdbackup.SlackBuild index 03ed09e99796..ab324bce25df 100644 --- a/multimedia/dvdbackup/dvdbackup.SlackBuild +++ b/multimedia/dvdbackup/dvdbackup.SlackBuild @@ -1,11 +1,29 @@ -#!/bin/sh -e +#!/bin/sh -#K.D.Hedger Sat 19 Jun 2010 01:23:49 PM BST -# kdhedger@yahho.co.uk # Slackware build script for dvdbackup +# Copyright 2013 John Vogel Corning, New York US +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + PRGNAM=dvdbackup -VERSION=${VERSION:-0.1.1} +VERSION=${VERSION:-0.4.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -36,28 +54,48 @@ else LIBDIRSUFFIX="" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Patches from lauchpad bazaar repo. +patch -p0 < $CWD/patches/do_not_treat_automake_warnings_as_errors.patch +patch -p0 < $CWD/patches/remove_PATH_MAX_limitation.patch -mkdir -p $PKG/usr/bin -CFLAGS="$SLKCFLAGS -I/usr/include -L/usr/lib${LIBDIRSUFFIX} -ldvdread" -gcc -o $PKG/usr/bin/dvdbackup $CFLAGS src/dvdbackup.c +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +# NEWS and README gets installed by `make install` mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING README $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/multimedia/dvdbackup/dvdbackup.info b/multimedia/dvdbackup/dvdbackup.info index 4480c5305fc4..198d9031fe0b 100644 --- a/multimedia/dvdbackup/dvdbackup.info +++ b/multimedia/dvdbackup/dvdbackup.info @@ -1,8 +1,8 @@ PRGNAM="dvdbackup" -VERSION="0.1.1" -HOMEPAGE="http://dvd-create.sourceforge.net/" -DOWNLOAD="http://dvd-create.sourceforge.net/dvdbackup-0.1.1.tar.gz" -MD5SUM="53a071d1def5ee49d702a4dd080d25ac" +VERSION="0.4.2" +HOMEPAGE="http://dvdbackup.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/dvdbackup/dvdbackup-0.4.2.tar.gz" +MD5SUM="28f273b2f27a3afea3a3c965ddbede86" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/multimedia/dvdbackup/patches/do_not_treat_automake_warnings_as_errors.patch b/multimedia/dvdbackup/patches/do_not_treat_automake_warnings_as_errors.patch new file mode 100644 index 000000000000..85ae907ae7ed --- /dev/null +++ b/multimedia/dvdbackup/patches/do_not_treat_automake_warnings_as_errors.patch @@ -0,0 +1,13 @@ +=== modified file 'configure.ac' +--- configure.ac 2012-06-24 01:58:24 +0000 ++++ configure.ac 2013-06-29 12:42:31 +0000 +@@ -13,7 +13,7 @@ + dnl Must come before AM_INIT_AUTOMAKE. + AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_MACRO_DIR([m4]) +-AM_INIT_AUTOMAKE([dist-xz -Wall -Werror]) ++AM_INIT_AUTOMAKE([dist-xz -Wall]) + + AM_GNU_GETTEXT_VERSION([0.17]) + AM_GNU_GETTEXT([external]) + diff --git a/multimedia/dvdbackup/patches/remove_PATH_MAX_limitation.patch b/multimedia/dvdbackup/patches/remove_PATH_MAX_limitation.patch new file mode 100644 index 000000000000..75a12955669a --- /dev/null +++ b/multimedia/dvdbackup/patches/remove_PATH_MAX_limitation.patch @@ -0,0 +1,463 @@ +=== modified file 'src/dvdbackup.c' +--- src/dvdbackup.c 2012-06-24 01:13:07 +0000 ++++ src/dvdbackup.c 2013-07-04 12:06:44 +0000 +@@ -2,7 +2,7 @@ + * dvdbackup - tool to rip DVDs from the command line + * + * Copyright (C) 2002 Olaf Beck <olaf_sc@yahoo.com> +- * Copyright (C) 2008-2012 Benjamin Drung <benjamin.drung@gmail.com> ++ * Copyright (C) 2008-2013 Benjamin Drung <benjamin.drung@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -179,7 +179,8 @@ + int vob = 1; + + /* Temp filename,dirname */ +- char targetname[PATH_MAX]; ++ char *targetname; ++ size_t targetname_length; + + /* Write buffer */ + +@@ -217,10 +218,18 @@ + fprintf(stderr,"DVDWriteCells: vob files are %d\n", number_of_vob_files); + #endif + ++ // Reserve space for "<targetdir>/<title_name>/VIDEO_TS/VTS_XX_X.VOB" and terminating "\0" ++ targetname_length = strlen(targetdir) + strlen(title_name) + 24; ++ targetname = malloc(targetname_length); ++ if (targetname == NULL) { ++ fprintf(stderr, _("Failed to allocate %zu bytes for a filename.\n"), targetname_length); ++ return 1; ++ } ++ + /* Remove all old files silently if they exists */ + + for ( i = 0 ; i < 10 ; i++ ) { +- sprintf(targetname,"%s/%s/VIDEO_TS/VTS_%02i_%i.VOB",targetdir, title_name, title_set, i + 1); ++ snprintf(targetname, targetname_length, "%s/%s/VIDEO_TS/VTS_%02i_%i.VOB", targetdir, title_name, title_set, i + 1); + #ifdef DEBUG + fprintf(stderr,"DVDWriteCells: file is %s\n", targetname); + #endif +@@ -237,9 +246,10 @@ + /* Create VTS_XX_X.VOB */ + if (title_set == 0) { + fprintf(stderr,_("Do not try to copy chapters from the VMG domain; there are none.\n")); ++ free(targetname); + return(1); + } else { +- sprintf(targetname,"%s/%s/VIDEO_TS/VTS_%02i_%i.VOB",targetdir, title_name, title_set, vob); ++ snprintf(targetname, targetname_length, "%s/%s/VIDEO_TS/VTS_%02i_%i.VOB", targetdir, title_name, title_set, vob); + } + + #ifdef DEBUG +@@ -248,6 +258,7 @@ + + if ((buffer = (unsigned char *)malloc(BUFFER_SIZE * DVD_VIDEO_LB_LEN * sizeof(unsigned char))) == NULL) { + fprintf(stderr, _("Out of memory copying %s\n"), targetname); ++ free(targetname); + return(1); + } + +@@ -259,6 +270,7 @@ + if ((streamout = open(targetname, O_WRONLY | O_CREAT | O_APPEND, 0666)) == -1) { + fprintf(stderr, _("Error creating %s\n"), targetname); + perror(PACKAGE); ++ free(targetname); + return(1); + } + +@@ -271,6 +283,7 @@ + fprintf(stderr, _("Failed opening TITLE VOB\n")); + free(buffer); + close(streamout); ++ free(targetname); + return(1); + } + +@@ -294,6 +307,7 @@ + free(buffer); + DVDCloseFile(dvd_file); + close(streamout); ++ free(targetname); + return(1); + } + if (have_read < to_read) { +@@ -303,6 +317,7 @@ + fprintf(stderr, _("Error writing TITLE VOB\n")); + free(buffer); + close(streamout); ++ free(targetname); + return(1); + } + #ifdef DEBUG +@@ -321,10 +336,11 @@ + close(streamout); + vob = vob + 1; + size = 0; +- sprintf(targetname,"%s/%s/VIDEO_TS/VTS_%02i_%i.VOB",targetdir, title_name, title_set, vob); ++ snprintf(targetname, targetname_length, "%s/%s/VIDEO_TS/VTS_%02i_%i.VOB", targetdir, title_name, title_set, vob); + if ((streamout = open(targetname, O_WRONLY | O_CREAT | O_APPEND, 0666)) == -1) { + fprintf(stderr, _("Error creating %s\n"), targetname); + perror(PACKAGE); ++ free(targetname); + return(1); + } + } +@@ -334,6 +350,7 @@ + DVDCloseFile(dvd_file); + free(buffer); + close(streamout); ++ free(targetname); + + return(0); + } +@@ -925,8 +942,10 @@ + int i; + + /* Temp filename,dirname */ +- char filename[PATH_MAX] = "VIDEO_TS.VOB"; +- char targetname[PATH_MAX]; ++ // filename is either "VIDEO_TS.VOB" or "VTS_XX_X.VOB" and terminating "\0" ++ char filename[13] = "VIDEO_TS.VOB"; ++ char *targetname; ++ size_t targetname_length; + struct stat fileinfo; + + /* File Handler */ +@@ -943,9 +962,10 @@ + /* Return value */ + int result; + ++ + /* create filename VIDEO_TS.VOB or VTS_XX_X.VOB */ + if(title_set > 0) { +- sprintf(filename, "VTS_%02i_%i.VOB", title_set, vob); ++ sprintf(filename, "VTS_%02i_%1i.VOB", title_set, vob); + } + + if (title_set_info->number_of_title_sets + 1 < title_set) { +@@ -980,7 +1000,14 @@ + fprintf(stderr,_("Do not try to copy a Title VOB from the VMG domain; there are none.\n")); + return(1); + } else { +- sprintf(targetname,"%s/%s/VIDEO_TS/VTS_%02i_%i.VOB",targetdir, title_name, title_set, vob); ++ // Reserve space for "<targetdir>/<title_name>/VIDEO_TS/<filename>" and terminating "\0" ++ targetname_length = strlen(targetdir) + strlen(title_name) + strlen(filename) + 12; ++ targetname = malloc(targetname_length); ++ if (targetname == NULL) { ++ fprintf(stderr, _("Failed to allocate %zu bytes for a filename.\n"), targetname_length); ++ return 1; ++ } ++ snprintf(targetname, targetname_length, "%s/%s/VIDEO_TS/%s", targetdir, title_name, filename); + } + + +@@ -990,6 +1017,7 @@ + tsize = title_set_info->title_set[title_set].size_vob[i]; + if (tsize%DVD_VIDEO_LB_LEN != 0) { + fprintf(stderr, _("The Title VOB number %d of title set %d does not have a valid DVD size\n"), i + 1, title_set); ++ free(targetname); + return(1); + } else { + offset = offset + tsize/DVD_VIDEO_LB_LEN; +@@ -1006,11 +1034,13 @@ + if (! S_ISREG(fileinfo.st_mode)) { + /* TRANSLATORS: The sentence starts with "The title file %s is not valid[...]" */ + fprintf(stderr,_("The %s %s is not valid, it may be a directory.\n"), _("title file"), targetname); ++ free(targetname); + return(1); + } else { + if ((streamout = open(targetname, O_WRONLY | O_TRUNC, 0666)) == -1) { + fprintf(stderr, _("Error opening %s\n"), targetname); + perror(PACKAGE); ++ free(targetname); + return(1); + } + } +@@ -1018,6 +1048,7 @@ + if ((streamout = open(targetname, O_WRONLY | O_CREAT, 0666)) == -1) { + fprintf(stderr, _("Error creating %s\n"), targetname); + perror(PACKAGE); ++ free(targetname); + return(1); + } + } +@@ -1025,6 +1056,7 @@ + if ((dvd_file = DVDOpenFile(dvd, title_set, DVD_READ_TITLE_VOBS))== 0) { + fprintf(stderr, _("Failed opening TITLE VOB\n")); + close(streamout); ++ free(targetname); + return(1); + } + +@@ -1032,6 +1064,7 @@ + + DVDCloseFile(dvd_file); + close(streamout); ++ free(targetname); + return result; + } + +@@ -1039,8 +1072,10 @@ + static int DVDCopyMenu(dvd_reader_t * dvd, title_set_info_t * title_set_info, int title_set, char * targetdir,char * title_name, read_error_strategy_t errorstrat) { + + /* Temp filename,dirname */ +- char filename[PATH_MAX] = "VIDEO_TS.VOB"; +- char targetname[PATH_MAX]; ++ // filename is either "VIDEO_TS.VOB" or "VTS_XX_0.VOB" and terminating "\0" ++ char filename[13] = "VIDEO_TS.VOB"; ++ char *targetname; ++ size_t targetname_length; + struct stat fileinfo; + + /* File Handler */ +@@ -1077,8 +1112,15 @@ + return(1); + } + ++ // Reserve space for "<targetdir>/<title_name>/VIDEO_TS/<filename>" and terminating "\0" ++ targetname_length = strlen(targetdir) + strlen(title_name) + strlen(filename) + 12; ++ targetname = malloc(targetname_length); ++ if (targetname == NULL) { ++ fprintf(stderr, _("Failed to allocate %zu bytes for a filename.\n"), targetname_length); ++ return 1; ++ } + /* Create VIDEO_TS.VOB or VTS_XX_0.VOB */ +- sprintf(targetname,"%s/%s/VIDEO_TS/%s",targetdir, title_name, filename); ++ snprintf(targetname, targetname_length, "%s/%s/VIDEO_TS/%s", targetdir, title_name, filename); + + if (stat(targetname, &fileinfo) == 0) { + /* TRANSLATORS: The sentence starts with "The menu file %s exists[...]" */ +@@ -1087,12 +1129,14 @@ + /* TRANSLATORS: The sentence starts with "The menu file %s is not valid[...]" */ + fprintf(stderr,_("The %s %s is not valid, it may be a directory.\n"), _("menu file"), targetname); + DVDCloseFile(dvd_file); ++ free(targetname); + return(1); + } else { + if ((streamout = open(targetname, O_WRONLY | O_TRUNC, 0666)) == -1) { + fprintf(stderr, _("Error opening %s\n"), targetname); + perror(PACKAGE); + DVDCloseFile(dvd_file); ++ free(targetname); + return(1); + } + } +@@ -1101,6 +1145,7 @@ + fprintf(stderr, _("Error creating %s\n"), targetname); + perror(PACKAGE); + DVDCloseFile(dvd_file); ++ free(targetname); + return(1); + } + } +@@ -1113,6 +1158,7 @@ + + DVDCloseFile(dvd_file); + close(streamout); ++ free(targetname); + return result; + + } +@@ -1120,7 +1166,9 @@ + + static int DVDCopyIfoBup(dvd_reader_t* dvd, title_set_info_t* title_set_info, int title_set, char* targetdir, char* title_name) { + /* Temp filename, dirname */ +- char targetname_ifo[PATH_MAX], targetname_bup[PATH_MAX]; ++ char *targetname_ifo; ++ char *targetname_bup; ++ size_t string_length; + struct stat fileinfo; + + /* Write buffer */ +@@ -1148,14 +1196,26 @@ + } + } + ++ // Reserve space for "<targetdir>/<title_name>/VIDEO_TS/VIDEO_TS.IFO" or ++ // "<targetdir>/<title_name>/VIDEO_TS/VTS_XX_0.IFO" and terminating "\0" ++ string_length = strlen(targetdir) + strlen(title_name) + 24; ++ targetname_ifo = malloc(string_length); ++ targetname_bup = malloc(string_length); ++ if (targetname_ifo == NULL || targetname_bup == NULL) { ++ fprintf(stderr, _("Failed to allocate %zu bytes for a filename.\n"), string_length); ++ free(targetname_ifo); ++ free(targetname_bup); ++ return 1; ++ } ++ + /* Create VIDEO_TS.IFO or VTS_XX_0.IFO */ + + if (title_set == 0) { +- sprintf(targetname_ifo,"%s/%s/VIDEO_TS/VIDEO_TS.IFO",targetdir, title_name); +- sprintf(targetname_bup,"%s/%s/VIDEO_TS/VIDEO_TS.BUP",targetdir, title_name); ++ snprintf(targetname_ifo, string_length, "%s/%s/VIDEO_TS/VIDEO_TS.IFO", targetdir, title_name); ++ snprintf(targetname_bup, string_length, "%s/%s/VIDEO_TS/VIDEO_TS.BUP", targetdir, title_name); + } else { +- sprintf(targetname_ifo,"%s/%s/VIDEO_TS/VTS_%02i_0.IFO",targetdir, title_name, title_set); +- sprintf(targetname_bup,"%s/%s/VIDEO_TS/VTS_%02i_0.BUP",targetdir, title_name, title_set); ++ snprintf(targetname_ifo, string_length, "%s/%s/VIDEO_TS/VTS_%02i_0.IFO", targetdir, title_name, title_set); ++ snprintf(targetname_bup, string_length, "%s/%s/VIDEO_TS/VTS_%02i_0.BUP", targetdir, title_name, title_set); + } + + if (stat(targetname_ifo, &fileinfo) == 0) { +@@ -1164,6 +1224,8 @@ + if (! S_ISREG(fileinfo.st_mode)) { + /* TRANSLATORS: The sentence starts with "The IFO file %s is not valid[...]" */ + fprintf(stderr,_("The %s %s is not valid, it may be a directory.\n"), _("IFO file"), targetname_ifo); ++ free(targetname_ifo); ++ free(targetname_bup); + return(1); + } + } +@@ -1174,6 +1236,8 @@ + if (! S_ISREG(fileinfo.st_mode)) { + /* TRANSLATORS: The sentence starts with "The BUP file %s is not valid[...]" */ + fprintf(stderr,_("The %s %s is not valid, it may be a directory.\n"), _("BUP file"), targetname_bup); ++ free(targetname_ifo); ++ free(targetname_bup); + return(1); + } + } +@@ -1183,6 +1247,8 @@ + perror(PACKAGE); + ifoClose(ifo_file); + free(buffer); ++ free(targetname_ifo); ++ free(targetname_bup); + close(streamout_ifo); + close(streamout_bup); + return 1; +@@ -1193,6 +1259,8 @@ + perror(PACKAGE); + ifoClose(ifo_file); + free(buffer); ++ free(targetname_ifo); ++ free(targetname_bup); + close(streamout_ifo); + close(streamout_bup); + return 1; +@@ -1204,6 +1272,8 @@ + fprintf(stderr, _("Failed opening IFO for title set %d\n"), title_set); + ifoClose(ifo_file); + free(buffer); ++ free(targetname_ifo); ++ free(targetname_bup); + close(streamout_ifo); + close(streamout_bup); + return 1; +@@ -1215,6 +1285,8 @@ + perror(PACKAGE); + ifoClose(ifo_file); + free(buffer); ++ free(targetname_ifo); ++ free(targetname_bup); + close(streamout_ifo); + close(streamout_bup); + return 1; +@@ -1226,6 +1298,8 @@ + fprintf(stderr, _("Error reading IFO for title set %d\n"), title_set); + ifoClose(ifo_file); + free(buffer); ++ free(targetname_ifo); ++ free(targetname_bup); + close(streamout_ifo); + close(streamout_bup); + return 1; +@@ -1236,6 +1310,8 @@ + fprintf(stderr, _("Error writing %s\n"),targetname_ifo); + ifoClose(ifo_file); + free(buffer); ++ free(targetname_ifo); ++ free(targetname_bup); + close(streamout_ifo); + close(streamout_bup); + return 1; +@@ -1245,11 +1321,15 @@ + fprintf(stderr, _("Error writing %s\n"),targetname_bup); + ifoClose(ifo_file); + free(buffer); ++ free(targetname_ifo); ++ free(targetname_bup); + close(streamout_ifo); + close(streamout_bup); + return 1; + } + ++ free(targetname_ifo); ++ free(targetname_bup); + return 0; + } + + +=== modified file 'src/main.c' +--- src/main.c 2012-06-24 01:13:07 +0000 ++++ src/main.c 2013-07-04 12:06:44 +0000 +@@ -2,7 +2,7 @@ + * dvdbackup - tool to rip DVDs from the command line + * + * Copyright (C) 2002 Olaf Beck <olaf_sc@yahoo.com> +- * Copyright (C) 2008-2012 Benjamin Drung <benjamin.drung@gmail.com> ++ * Copyright (C) 2008-2013 Benjamin Drung <benjamin.drung@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -172,7 +172,8 @@ + char* targetdir = "."; + + /* Temp filename,dirname */ +- char targetname[PATH_MAX]; ++ char *targetname; ++ size_t targetname_length; + struct stat fileinfo; + + /* The DVD main structure */ +@@ -403,9 +404,15 @@ + } + } + +- +- +- sprintf(targetname,"%s",targetdir); ++ // Reserve space for "<targetdir>/<title_name>/VIDEO_TS" and terminating "\0" ++ targetname_length = strlen(targetdir) + strlen(title_name) + 11; ++ targetname = malloc(targetname_length); ++ if (targetname == NULL) { ++ fprintf(stderr, _("Failed to allocate %zu bytes for a filename.\n"), targetname_length); ++ DVDClose(_dvd); ++ return 1; ++ } ++ snprintf(targetname, targetname_length, "%s", targetdir); + + if (stat(targetname, &fileinfo) == 0) { + if (! S_ISDIR(fileinfo.st_mode)) { +@@ -421,7 +428,7 @@ + } + + +- sprintf(targetname,"%s/%s",targetdir, title_name); ++ snprintf(targetname, targetname_length, "%s/%s", targetdir, title_name); + + if (stat(targetname, &fileinfo) == 0) { + if (! S_ISDIR(fileinfo.st_mode)) { +@@ -436,7 +443,7 @@ + } + } + +- sprintf(targetname,"%s/%s/VIDEO_TS",targetdir, title_name); ++ snprintf(targetname, targetname_length, "%s/%s/VIDEO_TS", targetdir, title_name); + + if (stat(targetname, &fileinfo) == 0) { + if (! S_ISDIR(fileinfo.st_mode)) { +@@ -513,7 +520,7 @@ + } + } + +- ++ free(targetname); + DVDClose(_dvd); + exit(return_code); + } + diff --git a/multimedia/dvdbackup/slack-desc b/multimedia/dvdbackup/slack-desc index 536efbb70703..a7d1dc70d770 100644 --- a/multimedia/dvdbackup/slack-desc +++ b/multimedia/dvdbackup/slack-desc @@ -8,10 +8,10 @@ |-----handy-ruler------------------------------------------------------| dvdbackup: dvdbackup (simple commandline DVD backup software) dvdbackup: -dvdbackup: See the README file in /usr/doc/dvdbackup-* for usage information. -dvdbackup: -dvdbackup: Homepage: http://dvd-create.sourceforge.net +dvdbackup: dvdbackup is a tool to backup video DVDs from the command line. +dvdbackup: It has the advantages of being small, fast, and easy to use. dvdbackup: +dvdbackup: Homepage: http://dvdbackup.sourceforge.net dvdbackup: dvdbackup: dvdbackup: |