Hi,

Cli currently core dumps when executed with -q or -qq option. Below
patch fixes the issue.


Index: Makefile
===================================================================
RCS file: /cvs/ports/archivers/par2cmdline/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile    10 Mar 2013 22:28:04 -0000      1.9
+++ Makefile    19 Apr 2015 10:06:06 -0000
@@ -2,6 +2,7 @@
 
 COMMENT=       command line implementation of the PAR v2.0 specification
 DISTNAME=      par2cmdline-0.4
+REVISION=      2
 CATEGORIES=    archivers
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=parchive/}
 
@@ -10,7 +11,6 @@
 # GPL
 PERMIT_PACKAGE_CDROM=  Yes
 
-REVISION =     1
 WANTLIB=               c m stdc++
 
 CONFIGURE_STYLE=gnu
Index: patches/patch-par2creatorsourcefile_cpp
===================================================================
RCS file: patches/patch-par2creatorsourcefile_cpp
diff -N patches/patch-par2creatorsourcefile_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-par2creatorsourcefile_cpp     19 Apr 2015 10:06:06 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+- par2 crash with -q or -qq: https://bugs.debian.org/299658 and 
http://sf.net/p/parchive/bugs/37/
+
+--- par2creatorsourcefile.cpp.orig     Thu Apr 15 14:45:23 2004
++++ par2creatorsourcefile.cpp  Sun Apr 19 10:57:32 2015
+@@ -213,11 +213,12 @@ bool Par2CreatorSourceFile::Open(CommandLine::NoiseLev
+         }
+       }
+ 
++      offset += want;
++
+       if (noiselevel > CommandLine::nlQuiet)
+       {
+         // Display progress
+         u32 oldfraction = (u32)(1000 * offset / filesize);
+-        offset += want;
+         u32 newfraction = (u32)(1000 * offset / filesize);
+         if (oldfraction != newfraction)
+         {

-- 
best regards
q#

Reply via email to