j2kdec & jpeg2000dec: check lengthinc against array size