diff --git a/sysutils/vobcopy/Makefile b/sysutils/vobcopy/Makefile index 1c3ba5fd685a..594b1127e50f 100644 --- a/sysutils/vobcopy/Makefile +++ b/sysutils/vobcopy/Makefile @@ -1,44 +1,44 @@ PORTNAME= vobcopy -PORTVERSION= 1.2.2 +PORTVERSION= 1.2.3 PORTREVISION= 0 CATEGORIES= sysutils MAINTAINER= dinoex@FreeBSD.org COMMENT= Decrypts and copies DVD .vob files WWW= https://github.com/barak/vobcopy LICENSE= GPLv2+ LIB_DEPENDS= libdvdread.so:multimedia/libdvdread USES= autoreconf gettext-tools localbase iconv USE_GITHUB= yes GH_ACCOUNT= barak GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share CFLAGS+= -DUSE_STATFS_FOR_DEV=1 MAKE_ARGS= CCLD="${CC}" PLIST_FILES= bin/vobcopy \ share/man/de/man1/vobcopy.1.gz \ share/man/man1/vobcopy.1.gz PORTDOCS= COPYING ChangeLog Changelog README Release-Notes TODO \ alternative_programs.txt OPTIONS_DEFINE= NLS DOCS OPTIONS_DEFAULT= NLS NLS_USES= gettext-runtime NLS_CONFIGURE_ENABLE= nls NLS_LIBS= -lintl post-configure: ${REINPLACE_CMD} -e 's|/usr/local/share/|${PREFIX}/share/|' \ ${WRKSRC}/vobcopy.c do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include diff --git a/sysutils/vobcopy/distinfo b/sysutils/vobcopy/distinfo index bec3aa265c34..b4a58dc8cb1c 100644 --- a/sysutils/vobcopy/distinfo +++ b/sysutils/vobcopy/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1776935666 -SHA256 (barak-vobcopy-1.2.2_GH0.tar.gz) = 44a435d048d57820a6396ed5a666f94856e11eac20f45dab59a5ca1bad793e95 -SIZE (barak-vobcopy-1.2.2_GH0.tar.gz) = 66725 +TIMESTAMP = 1779738454 +SHA256 (barak-vobcopy-1.2.3_GH0.tar.gz) = 3c844d8dd6d5ee6b3fda3a1c7a7d443e2391c99755a19b85f67178af5bb58fa7 +SIZE (barak-vobcopy-1.2.3_GH0.tar.gz) = 74283 diff --git a/sysutils/vobcopy/files/patch-dvd.c b/sysutils/vobcopy/files/patch-dvd.c index d928dd05e168..3652b9d18650 100644 --- a/sysutils/vobcopy/files/patch-dvd.c +++ b/sysutils/vobcopy/files/patch-dvd.c @@ -1,116 +1,116 @@ ---- dvd.c.orig 2022-05-03 19:55:34 UTC +--- dvd.c.orig 2026-05-18 12:42:51 UTC +++ dvd.c -@@ -176,7 +176,7 @@ int get_device( char *path, char *device ) +@@ -177,7 +177,7 @@ int get_device( char *path, char *device ) if( !strcmp( path, buf.f_mntonname ) ) { mounted = TRUE; -#if defined(__FreeBSD__) && (__FreeBSD_Version > 500000) +#if defined(__FreeBSD__) && (__FreeBSD_version > 500000) strcpy(device, buf.f_mntfromname); #else strcpy(device, "/dev/r"); -@@ -294,7 +294,7 @@ this is the code for the other-OSs, not solaris*/ +@@ -307,7 +307,7 @@ this is the code for the other-OSs, not solaris*/ #endif - if( ( tmp_streamin = fopen( "/etc/mtab", "r" ) ) ) + if( ( tmp_streamin = fopen( "/etc/fstab", "r" ) ) ) { strcpy( tmp_path, path ); strcat( tmp_path, " " ); /* otherwise it would detect that e.g. -@@ -346,7 +346,7 @@ this is the code for the other-OSs, not solaris*/ +@@ -359,7 +359,7 @@ this is the code for the other-OSs, not solaris*/ if( ( k = strstr( tmp_bufferin, "/dev/" ) ) == NULL ) { - fprintf( stderr, _("[Error] Weird, no /dev/ entry found in the line where iso9660 or udf gets mentioned in /etc/fstab\n") ); + fprintf( stderr, _("[Error] Weird, no /dev/ entry found in the line where cd9660 or udf gets mentioned in /etc/fstab\n") ); return -1; } l=0; -@@ -404,7 +404,8 @@ int get_device_on_your_own( char *path, char *device ) +@@ -417,7 +417,8 @@ int get_device_on_your_own( char *path, char *device ) struct statvfs *mntbuf; #endif - if( ( n = getmntinfo( &mntbuf, 0 ) ) > 0 ) + path[0] = '\0'; + if( ( n = getmntinfo( &mntbuf, MNT_NOWAIT ) ) > 0 ) { for( i = 0; i < n; i++ ) { -@@ -412,7 +413,7 @@ int get_device_on_your_own( char *path, char *device ) +@@ -425,7 +426,7 @@ int get_device_on_your_own( char *path, char *device ) { dvd_count++; strcpy( path, mntbuf[i].f_mntonname ); -#if defined(__FreeBSD__) && (__FreeBSD_Version > 500000) +#if defined(__FreeBSD__) && (__FreeBSD_version > 500000) strcat(device, mntbuf[i].f_mntfromname); #else strcpy(device, "/dev/r"); -@@ -495,14 +496,14 @@ int get_device_on_your_own( char *path, char *device ) +@@ -508,14 +509,14 @@ int get_device_on_your_own( char *path, char *device ) *read the device out of /etc/mtab */ - if( ( tmp_streamin = fopen( "/etc/mtab", "r" ) ) ) + if( ( tmp_streamin = fopen( "/etc/fstab", "r" ) ) ) { -/* strcpy(tmp_path, "iso9660"); */ +/* strcpy(tmp_path, "cd9660"); */ memset( tmp_bufferin, 0, MAX_STRING * sizeof( char ) ); while( fgets( tmp_bufferin, MAX_STRING, tmp_streamin ) ) { /* if(strstr( tmp_bufferin, tmp_path)) */ - if (strstr( tmp_bufferin, "iso9660" ) || + if (strstr( tmp_bufferin, "cd9660" ) || strstr( tmp_bufferin, "udf" ) || strstr( tmp_bufferin, "cdrom" ) || strstr( tmp_bufferin, "dvd" ) ) -@@ -514,7 +515,7 @@ int get_device_on_your_own( char *path, char *device ) +@@ -527,7 +528,7 @@ int get_device_on_your_own( char *path, char *device ) if( ( k = strstr( tmp_bufferin, "/dev/" ) ) == NULL ) { - fprintf( stderr, _("[Error] Weird, no /dev/ entry found in the line where iso9660, udf or cdrom gets mentioned in /etc/mtab\n") ); + fprintf( stderr, _("[Error] Weird, no /dev/ entry found in the line where cd9660, udf or cdrom gets mentioned in /etc/mtab\n") ); dvd_count--; continue; } -@@ -544,8 +545,17 @@ int get_device_on_your_own( char *path, char *device ) +@@ -557,8 +558,17 @@ int get_device_on_your_own( char *path, char *device ) */ - k = strstr( tmp_bufferin, " " ); + k = strpbrk( tmp_bufferin, " \t" ); + /* Avoid a core dump by checking that the break token + was found */ + if ( k == NULL ) + { + fprintf(stderr, "[Error] Unable to parse the /etc/fstab file\n"); + path[0] = '\0'; + return -1; + } + /*traverse the gap*/ if( isgraph( (int) *(k) )) -@@ -680,21 +690,6 @@ off_t get_vob_size( int title, char *provided_input_di +@@ -693,21 +703,6 @@ off_t get_vob_size( int title, char *provided_input_di return ( off_t ) vob_size; } - sprintf( stat_path, "%s_1.vob", path_to_vobs3 ); - if( ( tmp_streamin1 = fopen( stat_path, "r" ) ) != NULL ) /*check if this path is correct */ - { - fclose ( tmp_streamin1 ); - subvob = 1; - while( !stat( stat_path, &buf ) ) - { - /* adjust path for next subvob */ - subvob++; - snprintf( stat_path, sizeof(stat_path), "%s_%d.vob", path_to_vobs3, subvob ); - vob_size += buf.st_size; - } - return ( off_t ) vob_size; - } - /*none of the above seemed to have caught it, so this is the error return */ return ( off_t ) 0; /* think that (off_t) is not really needed here? as it is defined as off_t and the function is diff --git a/sysutils/vobcopy/files/patch-vobcopy.c b/sysutils/vobcopy/files/patch-vobcopy.c index 36042b04209f..cdcc4d3e0b26 100644 --- a/sysutils/vobcopy/files/patch-vobcopy.c +++ b/sysutils/vobcopy/files/patch-vobcopy.c @@ -1,11 +1,11 @@ ---- vobcopy.c.orig 2026-04-19 12:31:47 UTC +--- vobcopy.c.orig 2026-05-18 12:42:51 UTC +++ vobcopy.c -@@ -160,7 +160,7 @@ and potentially fatal." - Thanks Leigh!*/ +@@ -185,7 +185,7 @@ and potentially fatal." - Thanks Leigh!*/ #if defined( __gettext__ ) setlocale(LC_ALL, ""); textdomain("vobcopy"); - bindtextdomain("vobcopy", "/usr/share/locale"); + bindtextdomain("vobcopy", "/usr/local/share/locale"); #endif /* initialize string */