In libpar2-0.2.tar.gz, par2createsourcefile.cpp, start from line 216:
if (noiselevel > CommandLine::nlQuiet)
{
// Display progress
u32 oldfraction = (u32)(1000 * offset / filesize);
offset += want;
u32 newfraction = (u32)(1000 * offset / filesize);
if (oldfraction != newfraction)
{
cout << newfraction/10 << '.' << newfraction%10 << "%\r" << flush;
}
}
We can see that "offset += want" is skipped while noiselevel <= CommandLine::nlQuiet, which will cause the outer while loop "while (offset < filesize)" trap into an assertion failure with blocknumber >= blockcount.
This should be an obvious bug, is it?
Logged In: YES
user_id=22327
Originator: NO
just btw, debian etch has the following patch
--- par2creatorsourcefile.cpp (revision 398)
+++ par2creatorsourcefile.cpp (working copy)
@@ -213,11 +213,12 @@
}
}
+ 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)
{
changelog has
-- Wesley J. Landaker <wjl@icecavern.net> Sat, 25 Mar 2006 18:57:18 -0700
par2cmdline (0.4-6) unstable; urgency=low
* Applied patch to fix crash in quiet modes (closes: #299658)
- (Thanks to Stelios Bounanos <sb-bugs@enotty.net>)