peterdettman opened a new pull request #242: URL: https://github.com/apache/commons-compress/pull/242
The existing `BlockSort#med3` function is comparing byte values, which are signed. This seems off to me, since the main calling loop appears to be handling these bytes as (non-negative) 8-bit ints. Also the original C code appears to use unsigned char values (e.g. https://github.com/centricular/bzip2/blob/35e7280360320787d09a2419e0f5a1863feb8a34/blocksort.c#L583). This PR changes `BlockSort#med3` to accept int arguments and the caller to pass non-negative 8-bit values. I'm not really familiar enough with bzip2 to judge the impact, or to select a sample input for which this might matter. Hopefully someone more knowledgeable can weigh in. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
