* xdisp.c (compute_stop_pos): Check validity of end_charpos before using it.