apedec: do not keep incrementing the input data pointer past the end of the