Trying to find seg fault in read_until