@Override
	public boolean isValidIndex(long index) {
		if (index < 0 || index > len) {
			return false;
		}
		try {
			buffer.getByte((int) index);
			return true;
		}
		catch (MemoryAccessException e) {
			return false;
		}
	}
Return maximum length since actual length is unknown

@return maximum possible length
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/cmd/ProgramInsertByteProvider.java