Summary: | =app-arch/lbzip2-2.2: Assertion failure while compressing | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Florian Philipp <f_philipp> |
Component: | Current packages | Assignee: | Justin Lecher (RETIRED) <jlec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugzie, laszlo.ersek, mattst88, pinkbyte, zurgunt |
Priority: | Normal | Keywords: | UPSTREAM |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | https://github.com/kjn/lbzip2/issues/8 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
The file causing the issue
Proposed patch |
Description
Florian Philipp
2012-09-27 07:41:23 UTC
Created attachment 325110 [details]
The file causing the issue
Generated from an NTFS raw image with dd skip=2048 count=256
Created attachment 325132 [details, diff]
Proposed patch
The bug is caused when the body of a for-loop in a heuristic function is never executed. I don't understand the root cause but changing it to a do-while loop fixes the issue.
The patched version passes all of lbzip2's tests (`make check`) and I've also tested it for data corruption against several hundred randomly chosen files on my system (encode with lbzip2, decode with bzip2, cmp for checking). Decoding is not affected.
Lets see what upstream tells us about this bug. Thank you for the report. As upstream maintainer of lbzip2 I confirm this is a bug in the upstream code. I will fix it as soon as possible. The bug was introduced in version 2.2, so earlier versions shouldn't be affected. Also be careful with the patch proposed in comment #2, it doesn't look correct and may cause other issues. +*lbzip2-2.2-r1 (12 Jan 2013) + + 12 Jan 2013; Justin Lecher <jlec@gentoo.org> +lbzip2-2.2-r1.ebuild, + +files/lbzip2-2.2-assertion.patch, metadata.xml: + Backport fix from upstream git for Assertion failure, #436382 + |