Package: par2
Version: 0.4-2
Severity: normal

Dear DDs,

On a certain pair of files, "par2 create -q" and "par2create -qq" dump core.
However, "par2 create" in non-quiet mode, i.e. without -q or -qq, works fine
on the same input with otherwise identical options.

To reproduce:

1. Create an empty directory and change to it.

2. Create two files containing random data:

     mirror-root_20050315-0507.super.tar.gz, size 12486682 bytes
     mirror-usr_20050315-0442.super.tar.gz, size 899718239 bytes

   (Below is a script which builds these files.)

3. Execute one of the following commands:

   $ par2 create -qq -s2097152 -r25 redundancy.par2 *
   $ par2 create -q -s2097152 -r25 redundancy.par2 *

Either will cause a core dump with the following message:

  par2: verificationpacket.cpp:63: void 
VerificationPacket::SetBlockHashAndCRC(unsigned int, const MD5Hash&, unsigned 
int): Assertion `blocknumber < blockcount' failed.
  Aborted (core dumped)

On the other hand,

   $ par2 create -s2097152 -r25 redundancy.par2 *

works fine.

Thanks for all your hard work, and please feel free to contact me for more
information.

Reid


---- par2-bug-createfiles.bash ----

#!/bin/bash

MEG=$((128 * 1024))

function create_random_file () {
  SIZE=$1
  FILE=$2
  echo "size = $SIZE, file = $FILE"
  dd bs=128k count=$(($SIZE/$MEG)) if=/dev/urandom of=$FILE
  dd bs=1 count=$(($SIZE-$MEG*($SIZE/$MEG))) seek=$(($MEG*($SIZE/$MEG))) 
if=/dev/urandom of=$FILE
}

create_random_file 12486682 mirror-root_20050315-0507.super.tar.gz
create_random_file 899718239 mirror-usr_20050315-0442.super.tar.gz

---- end par2-bug-createfiles.bash ----

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.29
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages par2 depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.4.3-6    GCC support library
ii  libstdc++5                  1:3.3.5-8    The GNU Standard C++ Library v3

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to