4xm: do not overread while parsing header