Marcono1234 created TIKA-4031:
---------------------------------
Summary: ChmLzxBlock.intelE8Decoding() contains impossible check
Key: TIKA-4031
URL: https://issues.apache.org/jira/browse/TIKA-4031
Project: Tika
Issue Type: Bug
Affects Versions: 2.7.0
Reporter: Marcono1234
The method {{ChmLzxBlock.intelE8Decoding()}} contains the following check:
{code}
if (content[i] != 0xe8) {
{code}
[GitHub source
link|https://github.com/apache/tika/blob/f9b078763715efece1e8bf40823b91f21960717e/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/chm/ChmLzxBlock.java#L222]
This check is always true because {{content}} is a {{byte}} array and {{0xe8}}
(= decimal 232) is greater than the maximum {{byte}} value 127. Maybe this code
is missing a {{& 0xFF}}?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)