kaitai-io/kaitai_struct_java_runtime

Potential ArrayIndexOutOfBoundsException when term not found

liangde-chen opened this issue · 0 comments

This line causes ArrayIndexOutOfBoundsException when term not found

while (bytes[newLen] != term && newLen < maxLen)

It should be:

while (newLen < maxLen && bytes[newLen] != term)