Problem: Crash when dragging with the mouse.
Solution: Add safety check for NULL pointer. Check mouse position for valid
value. (Hirohito Higashi)
else
key_name[1] = get_pseudo_mouse_code(current_button,
is_click, is_drag);
+
+ /* Make sure the mouse position is valid. Some terminals may
+ * return weird values. */
+ if (mouse_col >= Columns)
+ mouse_col = Columns - 1;
+ if (mouse_row >= Rows)
+ mouse_row = Rows - 1;
}
#endif /* FEAT_MOUSE */
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 936,
/**/
935,
/**/
offset = room; /* Move as far as we can */
if (offset <= 0) /* No room at all, quit. */
return;
+ if (fr == NULL)
+ return; /* Safety check, should not happen. */
/* grow frame fr by offset lines */
frame_new_width(fr, fr->fr_width + offset, left, FALSE);