apache / drill

Apache Drill is a distributed MPP query layer for self describing data
https://drill.apache.org/
Apache License 2.0
1.93k stars 980 forks source link

Code contains multiple always true `byte <` checks #2799

Open Marcono1234 opened 1 year ago

Marcono1234 commented 1 year ago

Describe the bug The code contains multiple x < ... checks where x is a byte and the right-hand side is > 127 (= max byte value), so these conditions are always true:

Not completely sure what the fix here is, maybe (byte & 0xFF) < .... And also for StringFunctions maybe it should be 128 (decimal) instead of 0x128 (hex, = 296 decimal); at least the 0x128 looks a bit suspicious.